Repository navigation
Agent pane: read the agent a shell call starts (codex exec, claude -p, acpmux run) - #25040
Conversation
…, acpmux run) A shell tokenizer and each agent CLI's grammar, so the transcript can draw such a call as that agent (the next PR). Looks through timeout, nohup, env, sr, the perl alarm wrapper, reach/ssh/sh -c command strings and heredoc or < stdin prompts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f9b-2fcb-7c72-b06e-af8fce00adcb&host=cosmic-gray Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Unclear: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 7921f4f to compare; do not merge until green; see lane-rules Tour of Gallery before/after for |
|
Found 98 test failures on Blacksmith runners: Failures
...and 88 more test failures. View all on Blacksmith: run 40162552319, run 40162552294, run 40162552276
|
|
Bead |
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f9b-2fcb-7c72-b06e-af8fce00adcb&host=cosmic-gray Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f9b-2fcb-7c72-b06e-af8fce00adcb&host=cosmic-gray Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
command -v and a perl script that is not the alarm wrapper start nothing; attached short options (-mgpt-6), env -S and a prompt after -- read; acpmux run --parent (#25019) makes a sub-session acpmux records with typed state, which draws it, not its command. Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f9b-2fcb-7c72-b06e-af8fce00adcb&host=cosmic-gray Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
env reads its own options (-S/--split-string, -u, -C, --) and splits only one command; command -p -v is a lookup; assignments count only before a command and after env; at most 8 wrappers; --parent only among the options. A run folds only when both harnesses are known and differ, and a run's output file is forgotten once it ended and was read. Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f9b-2fcb-7c72-b06e-af8fce00adcb&host=cosmic-gray Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sh -c and perl -e count only among the leading options (a script file before them runs instead), perl's -- ends its options, an env -S string that is not one command is not read, and exec -a takes a name. A run ended by the turn's stop forgets its output file; a stopped run's card says Stopped, not Failed; a call met before the chat's harness was known folds again once it is. The gallery's fixture names no fleet host and covers only the card. Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f9b-2fcb-7c72-b06e-af8fce00adcb&host=cosmic-gray Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
time's -o and -f take a value, perl reads -eSCRIPT and -we SCRIPT, and a function definition
(f() { … }, function f { … }) runs nothing until it is called, so its body is not a run.
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f9b-2fcb-7c72-b06e-af8fce00adcb&host=cosmic-gray
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An array assignment (args=(codex exec "x")) is data, and a quoted brace closes no function body: words keep their source. Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16f9b-2fcb-7c72-b06e-af8fce00adcb&host=cosmic-gray Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo, 2026-10-24, word for word, looking at a
codex execreview that renders as a plain "Command" row:This is the first of two PRs. It adds the part that reads which agent a shell call starts. The next PR uses it to render such a call as a Subagent: the same card and Session Info row that sub-sessions and subagents get. It's split to stay under the ~800-line limit.
What changes
webviews/src/agent-session/acpmux/subagents/agentRuns.ts(new, not wired in yet):agentRun(command)returns the agent a shell command starts: its harness, model, effort, prompt, acpmux session name and host. It returns undefined when the command starts no agent.$'…', escapes,;/&&/||/|,{ … }and( … ), comments,$(…)/backquotes (kept as one word), fd redirections like2>&1, and<,<</<<-heredocs and<<<here-strings as standard input.VAR=x,env,nohup,exec,time,nice,caffeinate,timeout/gtimeout,sr, andperl -e 'alarm N; exec @ARGV'. It also re-parses the command strings thatreach HOST '…',ssh HOST '…'andsh|bash|zsh -c '…'run. reach and ssh give the host, and the outer stdin is passed into the inner command.codex exec,claude -p,acpmux run|new|exec), which options take a value, and where the model, effort, session name and prompt are. That covers Codex's-mand-c model_reasoning_effort=…/-c model=…, Claude's--model/--effort, and acpmux's-m HARNESS[/MODEL],-e,-n,--hostand--prompt-file.--help/--versionstart nothing, and neither does another subcommand (acpmux send). A bareacpmux new -n xwith no prompt starts nothing either.promptTitle(the first line of the prompt that says something),runModel("gpt-6-astra xhigh"),harnessFamily/harnessLabel,runReply(Codex's final message after itstokens usedlog, with Claude Code's "Shell cwd was reset" trailer removed), andbackgroundOutputPath.Risk
None at runtime: nothing imports the module yet. The next PR wires it into the subagent fold.
Tests
agentRuns.test.tsuses commands Claude Code recorded on 2026-10-24, with the paths scrubbed: a Codex review throughreachwith its prompt on stdin, the perl alarm wrapper, a heredoc prompt, anohup sh -cinsidereachbehind a pipe, and acpmuxnew/run,sr codexandclaude -p. Negatives from the same recordings:grep "codex exec",codex exec --help,pgrep -fl 'codex exec|…', a heredoc whose text mentionscodex exec,acpmux send, a bareacpmux new,claude mcp list. The webview CI jobs run the suite: huge-blue is out of memory right now, so it wasn't run locally. An independent Codex review comes before landing.Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.