You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observed live in TUI session 2026-08-11 01:15-01:25 UTC, jcode v0.75.0 (5ae2385), branch master, cwd ~/.jcode/source/jcode.
Symptom
New tool calls intermittently return the verbatim previous result of an earlier call (including the old [tool timing: start=... finish=...] header). This makes e.g. bash cat file right after edit file show pre-edit content.
edit /tmp/stale_test.txt → success, shows updated line
bash: cat /tmp/stale_test.txt → returns R1 verbatim (same timing header as Add auto-update system for release builds #1). read in the same batch returned the fresh file correctly.
Evidence that it is a dispatch-layer positional replay (not model/provider cache)
A "punch" batch of 5 parallel identical-name bash probes echo punch-N $(date +%s) returned:
slot1 → R1 (stale)
slots2-5 → fresh punch2..punch5
Then a different batch of 5 parallel bash greps (q1..q5, all distinct commands) returned [R1, punch2, punch3, punch4, punch5] — a strict positional 1:1 mapping onto the previous bash batch's results, two turns stale.
Same pattern for agentgrep: a grep "cache_control" + grep find batch both returned the first grep's result (same timing 01:17:04.343). A later read .git/HEAD returned the earlier read Cargo.toml payload (same timing 01:18:09.934). side_panel write with a corrected page_id re-returned the earlier page_id is required for write error verbatim.
Pattern
Replay is per tool name, keyed by ordinal call position within the batch, persisting across model turns.
When the previous same-tool batch had N results, a later M-call batch replays positions 0..min(N,M); positions beyond N came back fresh in the same batch.
Errors replay identically, so the store captures fully-rendered result objects, not just stdout.
edit, write, todo, debug_socket, mcp__github__* appeared fresh throughout — so the bug is in how built-in parallel tool results are stored/retrieved, not in the whole pipeline.
Where to look
Per-name per-positional result buffer (Vec keyed by call index?) that is not cleared or not fully overwritten when the next turn's batch for that tool is smaller, or a "reuse result" fast-path keyed by (name, position) instead of tool_use id. Suspicious areas: tool dispatch batching in crates/jcode-agent-runtime, result assembly into API messages, and any memoization around tool_result_tag / BatchSubResult (crates/jcode-message-types, crates/jcode-tui/ui_tools/batch.rs).
Full chronological table is in STALE_BUG_EVIDENCE.md at the repo root of the session working copy.
Environment
OS: linux x86_64, HP i7-1165G7, 7.4 GiB
Shared-server build channel was the active daemon.
Observed live in TUI session 2026-08-11 01:15-01:25 UTC, jcode v0.75.0 (5ae2385), branch master, cwd ~/.jcode/source/jcode.
Symptom
New tool calls intermittently return the verbatim previous result of an earlier call (including the old
[tool timing: start=... finish=...]header). This makes e.g.bash cat fileright afteredit fileshow pre-edit content.Minimal repro sequence from the session:
cat > /tmp/stale_test.txt << EOF\nline1 original\nEOF→ fresh (call it R1)/tmp/stale_test.txt→ success, shows updated linecat /tmp/stale_test.txt→ returns R1 verbatim (same timing header as Add auto-update system for release builds #1).readin the same batch returned the fresh file correctly.Evidence that it is a dispatch-layer positional replay (not model/provider cache)
A "punch" batch of 5 parallel identical-name bash probes
echo punch-N $(date +%s)returned:Then a different batch of 5 parallel bash greps (
q1..q5, all distinct commands) returned[R1, punch2, punch3, punch4, punch5]— a strict positional 1:1 mapping onto the previous bash batch's results, two turns stale.Same pattern for
agentgrep: agrep "cache_control"+grep findbatch both returned the first grep's result (same timing 01:17:04.343). A laterread .git/HEADreturned the earlierread Cargo.tomlpayload (same timing 01:18:09.934).side_panel writewith a correctedpage_idre-returned the earlierpage_id is required for writeerror verbatim.Pattern
edit,write,todo,debug_socket,mcp__github__*appeared fresh throughout — so the bug is in how built-in parallel tool results are stored/retrieved, not in the whole pipeline.Where to look
Per-name per-positional result buffer (Vec keyed by call index?) that is not cleared or not fully overwritten when the next turn's batch for that tool is smaller, or a "reuse result" fast-path keyed by (name, position) instead of tool_use id. Suspicious areas: tool dispatch batching in
crates/jcode-agent-runtime, result assembly into API messages, and any memoization aroundtool_result_tag/BatchSubResult(crates/jcode-message-types, crates/jcode-tui/ui_tools/batch.rs).Full chronological table is in
STALE_BUG_EVIDENCE.mdat the repo root of the session working copy.Environment