docs: record Coding session stall diagnosis

This commit is contained in:
inman
2026-09-02 11:10:50 +08:00
parent 8062b45103
commit dedbc85014

View File

@@ -0,0 +1,69 @@
# Task: Diagnose in-app Coding session stall
## Identity
- Task ID: 20260901-diagnose-session-stall-c398db33
- Mode: Feature
- Branch: main
- Worktree: /Users/inmanx/Documents/makelore
- Base commit: 8062b45103be45ae036167d3e9890c3ca9ba3e80
- Owner: codex
- Status: Completed
## Scope
- Diagnose whether the visible Makelore Code run in project `肉鸽小游戏`, Agent
`小小明`, Conversation `新对话` is still doing useful work or is stuck.
- Correlate the supplied screenshot with the live Electron/Pi process, Main log,
project metadata, and persisted Pi session timeline.
- Make no product-code change and do not abort, recover, or otherwise mutate the
user's live Conversation.
## Intent And Constraints
- Treat the screenshot's earlier Token Point failures separately from the latest
`继续` turn; do not infer that a historical error is the current terminal cause.
- Preserve Main ownership of runtime state and the rule that accepted work is not
automatically replayed.
- Use only read-only runtime diagnostics. Do not expose credentials, raw upstream
request details, or unrelated Conversation content.
## Outcome
- Confirmed that the visible run is stuck in its terminal-settlement path rather
than continuing model or tool work.
- The latest turn began at 11:50:10 local time. All observed upstream requests for
that turn returned HTTP 200, its tools completed, and Pi persisted a final
assistant message with `stopReason: stop` at 11:55:38.
- The screenshot was captured at 12:02:14 while the UI still displayed
`处理中 12 分 3 秒` and the stop control. At 12:10:08 the Pi session and Main log
were still unchanged, the shared Agent Server remained alive but idle at 0% CPU,
and it held no TCP connection.
- The earlier `词元点数余额不足` rows are historical failed branches and did not
cause the latest run to wait. The effective failure boundary is after final
`message_end`: the run did not become idle, so `agent_settled` was either not
emitted/delivered or did not take effect in Main projection.
- No live run, process, project file, or product source was changed.
## Verification
- Correlated project/Agent/Conversation IDs from the local schema-v2 metadata.
- Compared screenshot mtime, Pi JSONL mtime, Main log mtime, and wall-clock time.
- Inspected the final persisted Pi message and the preceding completed tool results.
- Checked the shared Agent Server process state, CPU time, and open TCP sockets.
- Checked ADR-006 and the current event projector: `message_end` completes the
assistant node, while authoritative `agent_settled` is required to set the run
idle and release run ownership.
## Follow-ups
- If a fix is requested, reproduce a long real tool-use turn whose final assistant
message is persisted but settlement is missing, then harden the Agent Server/Main
terminal handshake without replaying the accepted prompt.
- Add regression coverage for final `message_end` followed by missing/delayed
`agent_settled`, including safe recovery and release of run/background ownership.
## Promotion Candidates
- None. This task records a live diagnosis only; any product behavior change needs a
separate implementation task and verification.