fix(tui): make context pressure an agent directive - #5661
Conversation
Display-only sticky status landed in #5629. This slice makes the model-facing signal actionable: the constitution names the standing reaction, and the byte-stable turn_meta line tells the agent to surface the warning immediately instead of treating it as decorative text. Co-authored-by: ronohara <4027321+ronohara@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Claude finished @Hmbown's task in 1m 12s —— View job Review complete ✅
Summary: Small, well-scoped change. It renames the reaction the model takes on context-pressure turn metadata from vague severity labels ( Verified against repo invariants:
Minor, non-blocking nit: in Confirmed via No correctness bugs, no dead code, no missing test coverage for the new behavior. This is ready to merge as-is. |
|
Closing as never-merge per the standing boundary in DIRECTION.md / TRUTH_LEDGER: this change touches prompt authority (context pressure as an agent directive), which is a rail-protected surface — the same reason issue #5620 deliberately remains open as roadmap rather than closing on this implementation. Branch preserved; reopen only by founder direction. |
Summary
Second slice of #5620. Isabel's display-only sticky warning is already on
main(#5629). The remaining failure was that the model-facing line still read like decorative turn metadata, so the agent kept working until the user asked whether the warning existed.This PR:
BASE_PROMPT(frozen KV-cache prefix): when turn metadata includes a Context pressure warning or critical line, tell the user immediately, recommend/compact, and reduce scope;turn_metaline an explicitACTIONABLE: tell the user nowdirective;Does not close #5620: structured
context_pressurefields and prompt-injection economisation remain follow-up.Credit: report and recovery notes from @ronohara; display slice already landed as #5629 by @wuisabel-gif.
Testing
cargo fmton the touched filesgit diff --checkscripts/dev-test.sh tui context_pressure_message_emits base_prompt_carries_constitutional_core— 2 passedNo provider credentials or network access.
Checklist