Repository navigation
feat(sidecar,shell): 24-step turns, failure output reaches the model (v0.5.1 HGW-W5/W6) - #82
SaulBuilds wants to merge 2 commits into
Conversation
…t on (HGW-4) A build needs more than 8 model calls, and a failing step has to show the model why it failed. - Turns: default maxSteps 8 -> 24 (sessions::DEFAULT_MAX_STEPS), cap stays 32. A session's maxSteps still wins; the sidecar-wide default is configurable with CITRATE_HERMES_MAX_STEPS (clamped 1..=32). - Capture (agent-shell): a capped stream now keeps its first half-cap and its last half-cap (first error and final cause), with the truncation marker between them, instead of only the head. - shell_run: a non-zero exit puts the exit status and the end of stderr (or stdout when stderr is empty), at most FAILURE_TAIL_BYTES = 2048, in the summary the model reads first, and as stderr_tail/stdout_tail in the run facts. Successful runs are unchanged. - Toolchain: a run with no parseable report now states the exit code. Recognized compiler errors stay sanitized and trusted (the S6.3 guarantee: injected text in sources never reaches trusted output). When no cause is recognized, the end of stderr is handed over raw, bounded, and the result is Untrusted, so it taints the session (and, with HGW-1, later actions go to HIC cards). Tests: agent-shell runner (+1, two capture assertions extended), loop_capability_tests (+3), shell_run failure tail (+1), toolchain unparsed stderr (+1). Workspace: 2279 -> 2285 passed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wWZZ8GRVU9USh3kKQHsFe
BerryManifold
left a comment
There was a problem hiding this comment.
Reviewed step-limit defaults/clamping, bounded head/tail output capture, UTF-8 boundaries, and failure-output trust handling. Independently ran all 3 loop-capability tests and 3 capped-output runner tests on the #84 stack head: passed. No new blocking finding in this incremental diff. Approval does not clear the separate git-state blocker affecting the stack or replace required CI checks.
Matr0xshka
left a comment
There was a problem hiding this comment.
Reviewed step-limit defaults/clamping, bounded head/tail output capture, UTF-8 boundaries, and failure-output trust handling. Independently ran all 3 loop-capability tests and 3 capped-output runner tests on the #84 stack head: passed. No new blocking finding in this incremental diff. Approval does not clear the separate git-state blocker affecting the stack or replace required CI checks.
…dependency updates, #85) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wWZZ8GRVU9USh3kKQHsFe
HGW Week 1, runtime, 4 of 5. Stack: #79 → #80 → #81 → this PR (base
hgw/w1-project-create) → #83. Green on its own. Refs #76 (HGW-W6) and CitrateNetwork/citrate-core#291 (HGW-W5, runtime default).What changes
maxStepsgoes from 8 to 24 (sessions::DEFAULT_MAX_STEPS); the cap stays 32. A session's ownmaxStepsstill wins. The sidecar-wide default isCITRATE_HERMES_MAX_STEPS(clamped 1–32).FAILURE_TAIL_BYTES= 2048 bytes. The run facts carrystderr_tail/stdout_tail. Successful runs are unchanged.Interface for the core lane
maxSteps, or send 24; 32 is the most.shell_runresults carryrun.stderr_tail/run.stdout_tailon failure. The Activity card can show them.Not done from #76
Trimming the model's copy of
shell_runoutput to 4 KB while the event log keeps the full text. Model content and event content are one string today, so this needs a loop change. The summary tail gives the model the cause either way.Tests (red first)
loop_capability_tests: +3 (24-step default, per-session and per-sidecar settings, environment parsing).shell_runfailure tail: +1.🤖 Generated with Claude Code
https://claude.ai/code/session_018wWZZ8GRVU9USh3kKQHsFe