Remove SystemMessage.replace. A prompt forced from before_agent_start is a rendering
of the current prompt for the run, not conversation state: persisting it as a
replacing system message wrote the full prompt and tool list on every change,
lost the structured sections while forced, and disabled mid-conversation system
messages for the rest of the session once a replacement existed.
The transcript now always records section patches. AgentSession wraps
transformContext and, when a forced prompt is active, collapses the system
messages into one head carrying the forced text and the current tools. Providers
receive the same request as before; nothing is persisted and the projection ends
with the run.
The evals harness validated the without_docs variant from the transcript, which
relied on the persisted replacement. Its transform extension now records the
prompt it forced and validates that instead.
Map signal termination to conventional nonzero exit codes and reject null exit codes from custom shell operations while preserving partial output.
fixes#9577
Add SystemMessage.replace: replaying a system message with the flag discards the
accumulated prompt content, sections, and tools before applying it, and providers
collapse the transcript into one leading system message whenever a later message
replaces it.
A forced prompt from before_agent_start is opaque, so it is persisted as a replace
message holding the text in content with no sections (the agent loop fills in the
full tool set). Leaving force mode persists another replace message with the
structured sections. Previously the forced prompt became a preamble section patch,
so models with native mid-conversation system messages kept the original prompt
as their leading system prompt and received the forced one as a later update.
* fix(coding-agent): fail closed on user bash hook errors
Prevent failed execution-routing hooks from falling back to the local shell.
Fixes#9068
* fix(coding-agent): validate user bash hook results
* docs(coding-agent): clarify user bash result semantics
* docs(coding-agent): streamline user bash semantics
* fix(coding-agent): strengthen user bash regressions
* docs(coding-agent): clarify user bash breaking change
Separate stable and development entrypoints, exclude remote harness code from distributions, and verify isolated consumer installs before release. Fixes#9132.
Adds TuiAltScreenOptions.scrollToEndIndicator, composited onto the last
row of the follow-end primary scroll view while it is scrolled up. A left
press on the label resumes end-following. Minimal rebuild of #9080.
- follow up of missed commits for feat(coding-agent): adjust TUI selections in thinking-mode, models and scoped models #8900
* fix(coding-agent): keep fixed theme marker visible
- distinguish the saved theme from the preview cursor
- align the automatic option and update coverage
* fix(coding-agent): keep automatic theme marker visible
- mark configured light and dark themes during preview
- reuse shared theme formatting and update coverage
* fix(coding-agent): keep selector status markers visible
- place status markers before labels
- strike unavailable scoped models and update tests
* fix(coding-agent): align scoped model toggle behavior
- show checks for the all-enabled state
- toggle individual models consistently and add coverage
* docs(coding-agent): add changelog entry
* fix(coding-agent): keep trust marker visible while browsing
- move the saved marker before the trust option
- update tests and changelog
* fix(coding-agent): mark per-model thinking overrides
- add the leading level marker
- update tests and changelog
Run next-turn preparation only when the agent loop continues, allowing threshold compaction before the next provider request. Restore interactive progress when the same run resumes.
Closes#6879
Important to notice:
this changes when prepareNextTurn & prepareNextTurnWithContext are invoked:
the now run only when a next turn actually happens, and after shouldStopAfterTurn.