feat(cli): run aligned with the new session dialog, chat new (3/5) #340
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 408 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.360
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #340"
general
weight: 0.35
mzdluo123
Summary
Third implementation PR of
add-agent-shell-control(stacked on #339). Scope:tasks.md§2A. CLI only — no server, contract or UI change.webmux run(US-S07)--worktree REPO:WORKTREE|PATH(with--cwdchecked to stay inside);--new-worktree BRANCHwith--base,--existing-branch,--worktree-path,--repo,--refresh-base. New worktrees are pinned to the home page like the web does (--no-pin); a failed session keeps the worktree and names it.--start-side terminal|chat,--prompt TEXT|-,--init.--json({session, link}),--wait STATE --timeout DUR(124 on timeout),--label,--dry-run(env values shown as<inherited>/<explicit>).--attachinsists (exit 2). This changes the old behaviour of exiting 2.--follow: observer stream to stdout (--stripremoves control sequences), exits with the program's status (128+N for signals); SIGINT/SIGTERM only stop following (130/143) unless--kill-on-interrupt.webmux chat new/launch-config options(US-S08)--agent(or the only hybrid config), generatedwt/<date>-<time>branch redrawn on conflict, default base,--set,--permission,--init/--no-init,--attach(uploaded first),--terminal,--label. Failures report the step and what was created, nothing is rolled back.--waittracks the first turn and prints the agent's final reply;end_turn→ 0, other stops or an open permission/form request → 1 (--auto-wait-requestskeeps waiting).launch-config options NAMElists the agent's options for--set.Shared helpers (reused by 4/5 and 5/5)
Session-list waits (
--changed/--stable/--anyready forwait), observer follow, a streaming control-sequence stripper, chat turn tracking, repository/worktree resolution and home-pin writes with revision-checked retries.Deviations from the spec (spec updated in this PR)
--no-workspace: the server associates sessions by launch directory anyway, so it could not be honoured.--followdoes not resume after a dropped connection; it exits 1 and points towebmux attach.Verification
cmd/webmux/launch_test.goagainst a real server process:--follow --stripoutput and exit status,WEBMUX_SOCKET/WEBMUX_BINinside the session,--wait exitedand timeout 124, auto-detach,--dry-run, parent recorded for a session created from inside a session, worktree association/creation/pinning,chat new --waitandlaunch-config optionsagainst the fake ACP agent.go test -raceforinternal/sessioncmd,cmd/webmux,internal/archtest,internal/localclient,internal/agentguide;go vet ./...; golangci-lint v2.15.0; Windows cross-compile; darwin vet.User stories
US-S07, US-S08 added; US-M01 points to them; coverage index and verification log updated. Guide topics
launchandrecipesupdated; command reference regenerated.---
_Generated by Claude Code_