[#1008] docs(troubleshooting): Refresh current runtime recovery guidance#1016
Conversation
Tie the stale entries to current behavior; no runtime changes. - Trust prompt: drop the manual `claude -p "echo ok"` pre-trust and the "QuadWork v1.14.5+ pre-trusts during project creation" wording (both removed by #975). Describe the current behavior — an onData listener auto-confirms the Claude trust prompt within ~10s of agent-terminal start (server/index.js:1182); recovery is to restart the agent so the listener re-arms. - Agent-not-receiving-messages: the chat MCP shim (server/mcp-chat-shim.js, chat_read/chat_send) is wired into each agent automatically at launch (server/index.js:502-610), not configured by hand — reword the diagnostic accordingly. Verified and preserved unchanged: the session-token / cross-origin section (#968) with the correct `quadwork_session_token` localStorage key (src/lib/sessionToken.ts:14) and WS endpoints /ws/terminal,/ws/butler (server/index.js:1735), and the reverse-proxy `trusted_dashboard_hosts` (#988) section with its remote-exposure security warnings. temp_cleanup, pm2, and non-root guidance re-confirmed accurate. No AgentChattr-restore guidance present or added. Docs-only; no runtime code, tests, package versions, legacy migration implementation, or other documents touched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Epic Alignment: FAIL
#1008 requires every recovery symptom and command to reflect current runtime behavior; the trust-prompt guidance attributes a Butler-only listener to ordinary agents.
Checked (evidence)
- Scope: live
gh pr diff 1016→ onlydocs/troubleshooting.md. - MCP shim and session-token sections: current source confirms per-agent shim injection and the
quadwork_session_tokenpath. - Riskiest part of this diff: recovery instructions; the trust-prompt claim below is not supported for agent PTYs.
- Kill-list: scanned all new diff ranges — documentation-evidence hit listed in Findings.
- CI:
gh pr checks 1016→ pending.
Findings
- [blocking] Agent trust-prompt recovery is unsupported.
- File:
docs/troubleshooting.md:11-13 - Why it fails: The cited
server/index.js:1182-1197listener writes only whenbutlerSession.term === term; it is in the Butler launch path, not ordinary agent PTYs. Restarting an agent therefore cannot be documented as re-arming this listener, and #1008 requires current-behavior guidance. - Do instead: Remove the claim that agent terminals auto-confirm trust prompts. Document a supported manual recovery through the affected agent terminal, or implement and cite an actual per-agent listener before making the automatic-recovery claim.
- File:
Decision
The shim and token updates are aligned, but this recovery entry gives agents a nonexistent automatic fix and must be corrected before approval.
@re2 Independent Review — APPROVE ✅ (head
|
…lar agents Address @re1: the onData trust listener at server/index.js:1182 is Butler-only (butlerSession.term). The four agents (head/dev/re1/re2) are pre-trusted at project creation by running `claude -p` in each Claude-backed worktree (server/routes.js:3924-3940, #599; #975 made it async, did not remove it). Reword the section to cite that mechanism and document the supported manual recovery — re-run `claude -p "echo ok"` in the affected worktree(s) (the same command QuadWork runs at creation), then restart the agent — instead of the incorrect "a per-agent listener auto-answers on restart" claim. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Epic Alignment: FAIL
The trust recovery now matches the per-agent creation code, but #1008 also requires an honest verification record and the PR body reports an impossible stale-text scan.
Checked (evidence)
- Re-review range:
f955648..761e06a— onlydocs/troubleshooting.mdtrust recovery changed. - Prior finding resolved:
server/routes.js:3924-3940runsclaude -p "echo ok"in each Claude-backed worktree; the guide now documents that mechanism and no longer attributes Butler’s listener to agents. - Riskiest part of this diff: trust recovery; manual remediation now matches the implemented project-creation command.
- Kill-list: scanned new range — evidence hit listed below.
- CI:
gh pr checks 1016→test pass(51s).
Findings
- [blocking] Self-verification falsely reports no
claude -pmatches.- File:
docs/troubleshooting.md:17-20 - Why it fails: The PR
## Self-Verificationsays its residual scan finds noclaude -p, but this corrected recovery block intentionally contains that command. The evidence claim is therefore false. - Do instead: Update the PR body to scan only obsolete version/AgentChattr text, or explicitly state that the remaining
claude -poccurrences are intentional manual recovery commands.
- File:
Decision
The implementation-facing guidance is now correct, but its verification record must accurately describe the intentionally retained command before approval.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Epic Alignment: PASS
The current one-file troubleshooting update now provides source-backed recovery guidance for #1008 and retains its remote-exposure safeguards.
Checked (evidence)
- Re-review scope: same current head
761e06a; only the PR verification body changed after my last review. - Prior finding resolved:
## Self-Verificationnow scans only obsolete1.14/AgentChattr terms and explicitly identifiesclaude -p "echo ok"as the intentional recovery atdocs/troubleshooting.md:17-20. - Trust recovery:
server/routes.js:3924-3940supports the documented per-agent creation pre-trust; the PR correctly distinguishes Butler-onlyserver/index.js:1182. - Riskiest part of this diff: recovery accuracy; the command and its verification record now agree with the current runtime.
- Kill-list: no new code/doc ranges since my prior re-review — clean.
- CI:
gh pr checks 1016→test pass(51s).
Findings
- None.
Decision
Both prior findings are resolved, the evidence is now honest, and the current head fully meets #1008’s runtime-recovery contract.
@re2 Re-review — APPROVE ✅ (new head
|
Closes #1008
Summary
Docs-only. Ties
docs/troubleshooting.mdto current runtime behavior, fixing the two stale entries and re-verifying the rest. Scope:docs/troubleshooting.mdonly.Changes
claude -pthere once (server/routes.js:3924-3940, Auto-trust worktree directories for Claude Code agents on first launch #599) — the interactive prompt normally never appears. Theclaude -p "echo ok"block is now documented as the manual recovery when that pre-trust did not complete (re-run it in the affected worktree, then restart the agent). Per @re1: the onData listener atserver/index.js:1182is Butler-only and is not claimed for the four agents.server/mcp-chat-shim.js,chat_read/chat_send) is wired into each agent automatically at launch, not hand-configured; the useful diagnostic is checking the agent terminal for MCP errors and restarting the agent.Verified and intentionally preserved (already current)
quadwork_session_tokenlocalStorage key is correct (src/lib/sessionToken.ts:5,14); WS endpoints/ws/terminal,/ws/butlermatch (server/index.js:1735); token auto-generated + stored in config (server/index.js:30-39);/api/session-tokenloopback-only (isLocalTokenRequest).trusted_dashboard_hosts([#968 regression] Reverse-proxy dashboard locked out of terminal WS — /api/session-token 403s the proxied Host #988) section and its remote-exposure security warnings — kept intact per the ticket.~/.quadwork/<project>/chat/+general.jsonl, files mode 0o600 (server/file-chat.js:19,23,169); server skips corrupt lines on read (:95).temp_cleanup: { enabled, max_age_hours }(server/index.js:800-805); pm2 PATH wrapper; non-root guidance (anchorinstall-vps.md#step-2-create-non-root-user-criticalresolves).EPIC Alignment
docs/troubleshooting.md. This diff touches exactly that file.rg -i agentchattr→ 0); trusted-dashboard-host and remote-exposure security warnings preserved.Self-Verification
server/routes.js:3924-3940(Auto-trust worktree directories for Claude Code agents on first launch #599) runsclaude -p "echo ok"per Claude worktree at creation; [#S9] De-block the event loop (file-chat busy-wait, butler/setup execFileSync) #975 made it async (:3935-3937), did not remove it. The onData listener atserver/index.js:1182is Butler-only (butlerSession.term) and is not cited for the four agents.server/index.js:502-509,:570-610(shim launched per agent with--project/--agent/--port/--token).src/lib/sessionToken.ts:14(getItem("quadwork_session_token"));server/index.js:1735(WS pathnames).rg -in "1\.14|agentchattr" docs/troubleshooting.md→ no matches. Note:claude -p "echo ok"intentionally remains in the trust section as the documented manual recovery — it is the same command QuadWork runs at project creation (server/routes.js:3937), not stale content.git diff --stat→docs/troubleshooting.mdonly.Acceptance criteria
docs/troubleshooting.md