Commit Graph

10 Commits

Author SHA1 Message Date
metaphorics 42626b8c44 feat(coding-agent): make task.eager and todo.eager three-level eagerness enums 2026-06-14 11:09:29 +09:00
can1357 db573f713e fix(packages/coding-agent): resolved empty-stop retry handling regression
- Excluded assistant "thinking" content from non-empty stop detection in #isEmptyAssistantStop().
- Replaced the empty-stop retry prompt with the <system-injection> wrapper.
- Updated empty-stop reminder detection to accept <system-injection> messages.
- Added regression coverage for thinking-only stop retries to prevent skipped assistant output.
2026-06-13 00:20:05 +02:00
Theo Mathieu 416c9947bd fix(acp): finish prompt turn when extension/custom command is handled locally
Extension commands (e.g. /sonnet) and TypeScript custom commands that
consume the input without calling the LLM return early from
session.prompt() with no agent turn. In ACP mode this left the pending
prompt promise unresolved, hanging the client forever.

Change session.prompt() to return Promise<boolean>: true when the LLM
was invoked, false when the command was fully handled locally.
#runPromptOrCommand calls #finishPrompt immediately on a false return so
the ACP turn completes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 08:26:07 +02:00
DarkPhilosophy ad444f652c fix(coding-agent): retry orphaned toolUse stops to prevent history corruption
When Anthropic Claude returns stopReason: "toolUse" but the assistant
message contains no actual toolCall, the session would append a spurious
toolResult entry. This creates tool_result blocks without matching
tool_use blocks — structurally invalid for Anthropic's API validator.

The symptom is overloaded_error on every subsequent request (in: 0 out: 0),
even though servers aren't overloaded. Other providers handle the same
corrupted history more leniently, making the problem appear Anthropic-specific.

The #isEmptyAssistantStop guard now checks for stopReason === "toolUse"
with no text and no toolCall. When the retry cap is hit, tool-use orphans
are still removed from active context (unlike regular empty stops) because
they corrupt message history. A regression test covers both the retry and
cap scenarios.

For affected sessions: run /compact to drop the corrupted history tail.

Fixes review feedback from chatgpt-codex-connector.
2026-06-05 21:15:42 +03:00
can1357 5038ad7855 tests: delete/adjust brittle tests 2026-06-04 17:46:00 +02:00
can1357 51865fc1ea test(coding-agent): updated assertions for condensed prompt wording
- Aligned handoff, reminder, and system-prompt expectations with shortened copy.
- Added HTTP transport test for required initialize failures.
- Guarded SSE startup timeout against stale connection races.
2026-06-04 16:35:45 +02:00
SuperHedge a36e7d6192 fix(coding-agent): reset retry state on empty-stop cap 2026-06-01 09:35:20 +02:00
SuperHedge 49e029b33f fix(coding-agent): preserve retry state on empty stops 2026-06-01 09:35:20 +02:00
SuperHedge 23c339f6da Resolve empty-stop retry cap waits 2026-06-01 09:35:20 +02:00
SuperHedge 528f4c197b Guard empty assistant stops during active tasks 2026-06-01 09:35:20 +02:00