feat: shell discovery, session metadata and full command help (1/5) #338
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 · 441 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.364
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #338"
general
weight: 0.35
mzdluo123
Summary
First implementation PR of OpenSpec change
add-agent-shell-control(spec: #337, stacked on it). Scope:tasks.md§1, §2B and §7.1–7.2.Discovery (US-S01)
WEBMUX_SOCKET(local API socket) andWEBMUX_BIN(the running server'sos.Executable()), reserved likeWEBMUX_SESSION_ID: rejected in create requests and launch configs, skipped whenrunforwards the caller's environment.PATHis untouched.--socket,--config,WEBMUX_SOCKET, then the default config. A named socket that does not answer is "not running" (exit 3), never a fallback to another instance.selfresolves to$WEBMUX_SESSION_ID;contract.ExitTimeout = 124; local status gainsbin.$WEBMUX_BIN.Session metadata (US-S02, US-S03)
GET /api/sessions/{id}/details→SessionDetails(repository, worktree, launch config, hybrid record, existing artifacts dir, forwards, parent, children, labels, link). No token or env values; it never creates the artifacts folder.parentIdis recorded from the local socket's peer process (Manager.ProcessSession); the request body cannot set it and TCP creates have none.labels(validated before anything starts) andPATCH /api/sessions/{id}/labels({set, remove}, atomic). In memory only; the Web UI does not show them yet.webmux get [SESSION] [--json|--field PATH],webmux label,ls --label/--parent/--status.Help framework (US-S04)
internal/sessioncmd/command.go) drives parsing,--help(English, 80 columns, usage/args/options/env/output/exit/examples/see also) andhelp --json.--help/-h/help CMDgo to stdout with exit 0 without connecting; usage errors exit 2 and point to--help; a bare group (webmux config) lists its subcommands on stderr with exit 2. This fixesrun/attach/ls/open --helpreturning 2.webmux get self --json);runstays strict and keeps everything after--.cmd/webmux/commands.go, andTestOpsCommandFlagsMatchTablecompares each implementation's flags with the table. The top-level help keeps the-log-fileline the Windows client probes.Contract / UI
SessionInfo.parentId,SessionInfo.labels,CreateSessionRequest.labels,LabelsUpdate,SessionDetails;web/src/schemas.tsupdated (optional fields only, no visible UI change); wire snapshots re-recorded.Verification
make checkpasses locally (frontend build, format, docs/persistence guards, Oxlint, arch guard,go vet, golangci-lint v2.15.0).go test -raceforinternal/session,internal/api,internal/sessioncmd,cmd/...,internal/archtest,internal/contract,internal/wire,internal/launch,internal/docguard. LocallyTestWireSnapshotsdiffers only inrepository-commits.jsonbecause git 2.43 prints+00:00; this also fails on a cleanmainhere, so the snapshot is left as is and CI decides.User stories
New group S: US-S01–US-S04 (
docs/user-stories/shell-control.md); US-M05 updated; coverage index and a new verification log added. New usage pagedocs/usage/shell-control.md.---
_Generated by Claude Code_