docs: clarify Agent harness's agentId suffix is a resume token, not a running signal#346
Open
zknpr wants to merge 1 commit into
Open
docs: clarify Agent harness's agentId suffix is a resume token, not a running signal#346zknpr wants to merge 1 commit into
zknpr wants to merge 1 commit into
Conversation
… running signal Every Agent(codex:codex-rescue) return is suffixed by the Claude Code harness with `agentId: <id> (use SendMessage with to: '<id>' to continue this agent)`. This is a resume token for the same agent thread, not a "still running" or "in background" status indicator. Callers (including Claude itself) have repeatedly misread it as the latter and then incorrectly told users that Codex is still running in the background, when the work has actually completed. Adds one explicit caller-side rule in two places: - plugins/codex/skills/codex-result-handling/SKILL.md — the internal guidance the caller consults when presenting Codex output. - plugins/codex/commands/rescue.md Operating rules — the most common user-facing entry point (`/codex:rescue`). No code changes; both files are caller-side documentation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Claude Code harness appends a fixed-format suffix to every
Agent()return:This is a resume token for continuing the same agent thread via
SendMessage. It is not a "still running" or "in background" status signal — the agent has finished by the time the harness emits this suffix.Evidence this confuses callers
Searching one real Claude Code session transcript (314 MB JSONL) for
codex:codex-rescueactivity:agentId: <id> (use SendMessage...)suffix appended to agent returns.started in the background as <jobId>.In both quoted turns the work had in fact completed —
Agent()returned, the Codex task was done, and the misread came purely from the harness's resume-token suffix being mistaken for a status line.The pattern is common enough that affected users have started memorializing it as project-level memory ("never say 'codex is still running in background' after Agent() returns; verify with git status / tests immediately") rather than fixing the underlying confusion at the plugin documentation layer.
Fix
Adds one bullet in two caller-side locations:
plugins/codex/skills/codex-result-handling/SKILL.md— Internal guidance for presenting Codex helper output, which the caller (main Claude) consults when processing the agent's return.plugins/codex/commands/rescue.mdOperating rules — the most common user-facing entry point,/codex:rescue.The bullet explicitly:
git status --shortas the verify step when--writewas in effect.No functional changes
Documentation-only. Both edited files are caller-side guidance; no code paths change.
+2 lines, 0 deletions.🤖 Generated with Claude Code