Repository navigation
Description
Parent
Refs #7340 (gap 4, in-flight MCP calls and agent-team teammates)
Depends on
- none: on the frontier now
Open question for the owner
Can a resumed session observe in-flight MCP calls and agent-team teammates at all, and if not, does keep-going inventory them or record them as undetectable?
An MCP tool call whose session ended mid-call may leave no state the resumed session can read; agent teams are experimental and off by default here. Settling it decides whether this becomes an inventory rule or one line in the report naming these two kinds as not observable.
Options:
- Research first (
/discovery:research): what a resumed session can read about a prior session's MCP calls and teammates; then build to the answer. - Record both kinds as undetectable now: the report names them as not checked, with the reason, and the item closes.
- Inventory teammates only when agent teams are enabled; record MCP calls as undetectable.
RECOMMENDED: option 1, closing as option 2 if the research finds no readable state. Basis: judgment; the #7340 triage comment flags both as possibly unobservable.
Answered (owner, 2026-10-18 comment): option 1, research first; if nothing readable exists, keep-going reports them as undetectable.
Research result (2026-10-21, from the docs; the lane rechecks both pages, code.claude.com is on its host list)
- https://code.claude.com/docs/en/agent-teams: "
/resumeand/rewinddo not restore in-process teammates." The team config~/.claude/teams/{team-name}/config.jsonis removed when the session ends; the task list~/.claude/tasks/{team-name}/"stays on disk after the session ends". The team name issession-plus the first 8 characters of the session ID. - https://code.claude.com/docs/en/mcp: a backgrounded call's task "doesn't survive exiting the session", and "Stopping doesn't guarantee the server stops: it may already have done some of the work". The only on-disk trace is a backgrounded call's
backgroundOutputPathfile, to which "Claude Code adds no closing line". No in-flight call record is described.
So teammates have readable state (the task list); MCP calls do not, beyond a possible partial output file.
Outcome
keep-going's report accounts for in-flight MCP calls and agent-team teammates: each is either inventoried with its real state or named as not observable, with the reason. None is silently skipped.
Key interfaces
- The shared session-flow reference "Off-thread work: inventory kinds and the inspect-real-state invariant", section "What counts as off-thread work".
Done when
- The owner has answered the open question in a comment (2026-10-18: research first).
-
plugins/session-flow/reference/off-thread-work.md"What counts as off-thread work" lists agent-team teammates and in-flight MCP calls. Teammates: not restored after a resume; keep-going reads~/.claude/tasks/session-<first 8 of the prior session id>/when it exists and reports each task's status (pending, in progress, completed) as the teammates' last recorded state, and with no directory reports teammates as none recorded. MCP calls: reported as not observable, with the reason (the call does not survive the session; the server may have done part of the work); when the prior transcript names abackgroundOutputPaththat still exists, its contents are reported as partial output whose completion is unknown. Each statement carries a pointer, an as-of date and a recheck trigger (.claude/rules/skill-bodies-state-current-rules.md). Check: the PR's CI runs the markdown lint and it passes; the reviewer checks each pointer. - The keep-going report names both kinds after a stop, with state or a not-observable reason:
plugins/session-flow/skills/keep-going/SKILL.mdnames both kinds in its report and never skips them silently. Check: the PR's CI runs the skill-quality check on the changed SKILL.md and it passes. - A keep-going eval case covers the chosen behavior: one
evals.jsoncase with a stop that leaves a task-list directory and one MCP call in flight. Check:plugins/skill-quality/scripts/check-evals-quality.shpasses. - A
.changes/session-flow/fragment exists. Check: the PR's CI runsscripts/check-changelog-fragments.sh --checkand it passes.
Out of scope
- Enabling agent teams.
- Nested subagents and CLI child processes (sibling items).
Files the fix would touch
plugins/session-flow/reference/off-thread-work.mdplugins/session-flow/skills/keep-going/SKILL.mdplugins/session-flow/skills/keep-going/evals/evals.json.changes/session-flow/changelog fragment
No protected path.
Activity
kyle-sexton commentedon Oct 18, 2026
Owner decision: research first whether a resumed session can read in-flight MCP calls or agent-team teammates at all. If nothing readable exists, keep-going reports them as undetectable and this closes. Stays held until that research is done.
Posted by Claude Code on the owner's behalf.
feat(session-flow): report surviving MCP background output as partial
fix(session-flow): treat MCP background output paths as untrusted
fix(session-flow): name the report for non-serve background paths