Repository navigation
bug(prompt): with the claude-bridge provider the injected harness never reaches the model, so ODD is silently replaced by the stale gentle-ai skill #1485
Description
Activity
Confirming this on Windows (WSL) with the same versions (gentle-pi 3.7.0, Pi 0.87.1, pi-claude-bridge 0.8.0). The source is unchanged on
main@ b756b4f (extensions/gentle-ai.ts:9245). Four additions that may help triage:1. The
appendSystemPromptchannel you suggest works. Probe:// probe.ts: which before_agent_start route reaches the model? export default function (pi: any) { pi.on("before_agent_start", (event: any) => { const opts = event.systemPromptOptions; if (opts && !String(opts.appendSystemPrompt ?? "").includes("PROBE-ROUTE-B-7Q2")) { opts.appendSystemPrompt = `${opts.appendSystemPrompt ?? ""}\n\nPROBE-ROUTE-B-7Q2: injected by mutating systemPromptOptions.appendSystemPrompt.`; } return { systemPrompt: `${event.systemPrompt}\n\nPROBE-ROUTE-A-3K9: injected by returning systemPrompt.` }; }); }
gentle-shell -- -p --model claude-bridge/claude-opus-5-5 -e ./probe.ts \ 'Do not use any tools. Quote verbatim every line of your system instructions that contains the text "PROBE-ROUTE-". If none, answer exactly: NONE. Then state whether you can see the text "Organic Driven Development" in your instructions (yes/no).'PROBE-ROUTE-B-7Q2: injected by mutating systemPromptOptions.appendSystemPrompt. No, "Organic Driven Development" does not appear in my instructions.Route A, the returned
systemPromptthat gentle-pi uses, is dropped. Route B, the mutatedsystemPromptOptions.appendSystemPrompt, reaches Claude Code. Withopenai-codex/gpt-5.5, the same probe reports that it sees "Organic Driven Development".The bridge re-records
systemPromptOptionsatagent_startandturn_start, so the mutation should arrive regardless of extension load order. That is my reading ofsrc/index.ts; the probe only exercised the default order.2. Pi's own docs recommend this route. From
docs/extensions.md, in the events section:before_agent_startexposes both the current prompt and its structuredsystemPromptOptions. Prefer changing prompt sections, selected tools, or guidelines so Pi can append a transcript delta. ReturningsystemPrompt[...] replaces the whole prompt for that run.The fix therefore aligns gentle-pi with the documented extension contract instead of adding bridge-specific handling.
3.
gentle-todo.tsis affected too.extensions/gentle-todo.ts:239returns{ systemPrompt: \${event.systemPrompt}\n\n${block}` }`, so the todo block is dropped under claude-bridge as well.4. Points to settle in design if the maintainer approves moving the injection:
- ordering relative to a user's own
APPEND_SYSTEM.md, which shares the field; - idempotency across turns, for example a marker check as in the probe;
- keeping the
isNamedAgent/isSddAgentexclusions; - whether volatile per-turn content (RDD status, todo staleness) belongs in that section, given the caching concerns in bug(agents): volatile RDD/SDD status embedded in the rebuilt system prompt defeats prompt caching #1029, Improve prompt cache ordering for el Gentleman harness #67 and bug(todo): dynamic stale-turn counter in system prompt invalidates prompt cache every turn #1367.
A regression test could assert that the harness lands in
systemPromptOptions, not only in a returnedsystemPrompt.I will not open a PR unless the maintainer marks this
status:approvedand the author of this issue is fine with it.AI assistance disclosure: this investigation, the probe, and this comment were produced with an AI coding agent (Claude Opus 5.5 via gentle-shell, running through the same claude-bridge setup). The comparison and the probe ran live in my environment, and I reviewed the results before posting.
- ordering relative to a user's own
- addedstatus:approvedIssue approved by maintainer; PR may be openedIssue approved by maintainer; PR may be opened
on Sep 27, 2026 - added a commit that references this issue
on Sep 27, 2026 Another occurrence on the latest published release, after this issue was closed.
- Build: gentle-pi 3.7.0 (latest release, v3.7.0), Pi 0.87.1, pi-claude-bridge 0.8.0, macOS arm64, provider
claude-bridge, modelclaude-opus-5-5. - Observed: the model received the
claude_codepreset plus context files and the skills block, but no gentle-pi harness text (no "Default workflow: Organic Driven Development (MANDATORY)", no identity/persona, no RDD line). In a long ODD session the model skipped the todo projection, updated the feature document only after code, and ignored the mapping and writer delegation triggers until the user noticed. - Expected: the harness reaches the model, as fix(prompt): deliver the harness through appendSystemPrompt so bridge providers receive it #1497 intends.
#1497 is merged on
mainbut is not in any published release yet, so users on 3.7.0 are still affected. Could it ship in a release (or prerelease)? Local workaround in the meantime: a short globalAGENTS.mdpointing the model at the ODD protocol, since context files are forwarded by the bridge.- Build: gentle-pi 3.7.0 (latest release, v3.7.0), Pi 0.87.1, pi-claude-bridge 0.8.0, macOS arm64, provider
Another occurrence on the latest published release, this time on Linux.
- Build: gentle-pi 3.7.0 (latest npm and GitHub release), Pi 0.87.1, pi-claude-bridge 0.9.0, Linux x86_64 (Omarchy/Hyprland).
- Setup: the same session and project were run with two providers:
claude-bridge/claude-opus-5-5- a native Pi provider (
gpt-6-sol)
- Prompt: "Me fale sobre ODD" ("tell me about ODD").
- Observed:
- Native provider: it describes Organic Driven Development: the six ODD steps, and that SDD is optional.
- claude-bridge: it has no ODD instruction at all and answers with generic meanings (Observability-Driven Development, Outcome-Driven Development).
- Expected: the harness reaches the model on claude-bridge too, as fix(prompt): deliver the harness through appendSystemPrompt so bridge providers receive it #1497 intends.
I checked the installed 3.7.0 source.
extensions/gentle-ai.tsstill returns the harness only assystemPrompt: \${event.systemPrompt}${gentlePrompt}…`frombefore_agent_start. pi-claude-bridge 0.9.0 still projects only context files, skills,customPromptandappendSystemPrompt(src/prompt-capture.ts,projectCapture). The bridge also excludes everyCLAUDE.md(claudeMdExcludes: ["**/CLAUDE.md", …]`), so a Claude Code–side Gentle install does not fill the gap.#1497 is merged on
mainbut is not in a published release. Is a 3.7.x patch or prerelease with it planned?
Before submitting
Problem
When Pi runs with the
claude-bridgeprovider (pi-claude-bridge), none of the gentle-pi harness text reaches the model. This covers the ODD protocol, the identity contract, the persona, the RDD status line, and the research capabilities block. The session looks normal, and gentle-pi tools such assubagent_run,gentle_review, andorchestrator_*all work. The model simply never receives "Default workflow: Organic Driven Development (MANDATORY)".Root cause:
systemPrompt: event.systemPrompt + gentlePrompt + …frombefore_agent_start(extensions/gentle-ai.ts, around line 9156;buildGentlePromptinlinesassets/orchestrator.md).pi-claude-bridge0.8.0 does not forward that assembled prompt. It recordsevent.systemPromptOptionsand sends Claude Code theclaude_codepreset, appending only the portable parts: context files, the skills block,customPrompt, andappendSystemPrompt(src/prompt-capture.ts,projectCapture;src/index.ts,systemPrompt: { type: "preset", preset: "claude_code", append }).before_agent_startreturn value is dropped without any warning. A bridge comment suggests this is deliberate: shipping Pi's harness verbatim trips Anthropic's third-party plan-eligibility check.Impact: the only gentle-pi guidance that survives is the skills block. In that block,
skills/gentle-ai/SKILL.mdstill sayslarge / ambiguous / risky → SDDand never mentions ODD (see #1085). Under claude-bridge, that stale skill becomes the sole workflow contract. In my session, the agent answered "apply ODD" by creating a full OpenSpec/SDD change (proposal, spec, design, tasks, apply-progress). It could not even recognize the term ODD without searching the package on disk.Steps to reproduce
pi-claude-bridge, and setdefaultProvider: "claude-bridge"in the Pi agentsettings.json.gentle-aiskill's SDD routing.Expected and actual behavior
Expected: the harness (ODD default, identity, persona, RDD status, research block) reaches the model on every supported provider. If a provider cannot carry extension-injected prompt text, gentle-pi detects this and either uses a channel that provider forwards (for example
appendSystemPrompt, a context file, or the skills block) or at least warns visibly that the harness is inactive.Actual: under
claude-bridge, the injected harness is silently dropped. Tools stay available, so nothing looks broken. The model follows the stalegentle-aiskill (#1085) and routes explicit ODD requests into SDD.gentle-pi version
3.7.0 (pi-claude-bridge 0.8.0)
Pi version
0.87.1
Operating system
macOS
Relevant logs or error output (optional)