Skip to content

Show what a Codex or OpenCode subagent did, and give it its task again on a follow-up - #123

Merged
m4rocks merged 1 commit into
mainfrom
subagent-acp-fix
Nov 17, 2026
Merged

m4rocks merged 1 commit into
mainfrom
subagent-acp-fix

Conversation

@m4rocks

@m4rocks m4rocks commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Summary

Claude Code reports a Codex or OpenCode subagent with 0 tool uses. The agent's commands run inside Codex or OpenCode and reach Claude Code only as text, so a caller took a short report for one written without reading the code.

A message sent to a finished subagent also reached Codex without its context. Claude Code spawns the agent again for that message, with the message as the prompt, and the helper starts a fresh Codex session each turn. Codex had neither the task nor its earlier report, and asked which file was meant.

The report handed back now ends with the steps the agent ran, or says it ran none. It lists at most 30, each on one line and cut at 120 characters. A follow-up turn reads the subagent's transcript and sends the agent the first task, the last report and the new message.

Evidence

  • claude plugin test mod passes 21 tests. The two follow-up tests fail with the old customTask.
  • A live claude -p --plugin-dir mod run with a read-only gpt-6.1-sol subagent handed back Steps Codex ran (1): - Get-Content -LiteralPath README.md -TotalCount 1.
  • In the same run, Codex received the task, its report and "Now give the second non-empty line of the same file.", and answered from README.md. Before the fix, the same follow-up got back "Which text should I take the second non-empty line from?"

Risk

The report grows by up to 31 lines, and a follow-up prompt grows with the first task and the last report. Only mod/hooks/register.js and its test change, so reverting this commit undoes it.

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
claudiu Ready Ready Preview Nov 17, 2026 12:03pm UTC

…n on a follow-up

Claude Code reports these subagents with 0 tool uses, because the agent's commands run inside Codex or OpenCode and reach Claude Code only as text. The report handed back now ends with the steps the agent ran, or says it ran none: at most 30, each on one line and cut at 120 characters.

Claude Code spawns the agent again for a message sent to it after it finished, with that message as the prompt, and each turn starts a fresh Codex or OpenCode session, so the agent saw only the message. A follow-up turn now reads the subagent's transcript and sends the first task, the last report and the new message.
@m4rocks
m4rocks merged commit dd9015d into main Nov 17, 2026
5 checks passed
@m4rocks
m4rocks deleted the subagent-acp-fix branch November 24, 2026 22:38

This branch was successfully deployed

1 active deployment
Preview — 2759ce9f Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant