Repository navigation
fix(tui): show agent-scoped session example - #130519
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 8:25 PM ET / August 27, 2026, 00:25 UTC. ClawSweeper reviewWhat this changesThis PR adds a pasteable agent-scoped session-key example to the TUI’s multi-agent startup error and updates the matching behavior assertion. Merge readinessThe patch is a focused, behaviorally aligned diagnostic correction with no concrete defect found. Keep it open for a rebase and exact-head review because this checkout could not hydrate the differing current-main TUI files. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe TUI resolves an initial agent from an explicit session key, configured defaults, or the working directory before connecting to a Gateway. When an explicitly owned multi-agent setup has no resolvable owner, it stops with a diagnostic that now shows the supported session-key form. flowchart LR
A[Operator starts terminal UI] --> B[TUI command and options]
B --> C[Initial agent selection]
C --> D{Explicit owner resolved?}
D -- Yes --> E[Open selected session]
D -- No --> F[Selection-required diagnostic]
F --> G[Agent-scoped session example]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests -1. Total -1 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve this owner-boundary diagnostic, rebase it onto current main, and verify the displayed command still matches the session-key grammar before merging. Do we have a high-confidence way to reproduce the issue? Yes—an explicit two-agent configuration outside either agent workspace reaches this diagnostic, and the PR records before/after terminal output; I did not execute untrusted contributor code locally. Is this the best way to solve the issue? Yes—the change improves the error at the startup selection owner using the already-supported session-key grammar and existing command formatter, without adding a competing flag or fallback. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 162e8d139404. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready review completed on exact head
Commands run: Known proof gap: no contributor-branch scripts or tests were executed locally during review; the external fork remained isolated. Exact-head hosted CI, the focused contributor evidence, and ClawSweeper's accepted live output cover this bounded diagnostic-only change. |
|
Merged via squash.
|
Co-authored-by: Benjamin Badejo <[email protected]>
What Problem This Solves
Fixes an issue where users running
openclaw tuiwith multiple explicitly owned agents would be told to pass an agent-scoped--sessionkey without being shown the supported syntax. The incomplete hint can lead users to try unsupported--agentIdor--agentoptions.Why This Change Was Made
The TUI-specific startup diagnostic now includes the supported pattern:
openclaw tui --session agent:agentname:main. This changes display text only; CLI options, agent resolution, session parsing, and fallback behavior remain unchanged.AI-assisted: yes.
User Impact
Users can act on the startup error directly instead of guessing unsupported flags.
Evidence
Before (installed OpenClaw 2026.8.1 development cut at
ad24304):After (isolated checkout, using a synthetic two-agent configuration):
pnpm test src/tui/tui.test.ts -- --reporter=dot— 88 tests passed on the rebased PR commitpnpm check:changed -- src/tui/tui.ts src/tui/tui.test.ts— passed the classified core and core-test checkspnpm build— passedautoreview --mode uncommitted— clean, with no accepted/actionable findings