merge opencode's original system prompt (including AGENTS.md) into system prompt#17
merge opencode's original system prompt (including AGENTS.md) into system prompt#17kikoreis wants to merge 4 commits into
Conversation
Previously the bridge would replace opencode's entire system prompt (including AGENTS.md content) with the Claude Code identity blocks. Now we merge them: [billingHeader, ...opencodeSystem, ...claudeCodeIdentity]
Fix indentation
Previously the bridge would replace opencode's entire system prompt (including AGENTS.md content) with the Claude Code identity blocks. Now we merge them: [billingHeader, ...opencodeSystem, ...claudeCodeIdentity]
sigh
|
What if your Claude Code exiting prompt and Opencode "AGENTS.md" are actually the same ? will we send redundant ones or am I not understanding the problem well ? Thanks taking notice btw, I imaging this will be a problem for people who have different "AGENTS.md" for both tools. |
|
Thanks for this, @kikoreis — you found a real one. Dropping One bug to fix before merge: by the time this runs, the billing header has already been unshifted onto const opencodeSystem = parsed.system.filter(
(s) => !s.text?.startsWith("x-anthropic-billing-header:")
);
parsed.system = [
{ type: "text", text: billingHeader },
...opencodeSystem,
...rewritten,
];Two more things:
Really nice catch overall. Fix the dup + add a test and I think this is good to go. |
dotCipher
left a comment
There was a problem hiding this comment.
Requesting changes, see notes above for suggestions
I was surprised that my global AGENTS.md file was being ignored, and inspecting that led me here.
Previously the bridge code would replace opencode's entire system prompt (including AGENTS.md content) with the Claude Code identity blocks. This PR implements merging billingHeader, opencodeSystem and claudeCodeIdentity.