fix(cmd): add --user flag to agent chat for user_id authentication#714
Open
stanleykao72 wants to merge 1 commit intonextlevelbuilder:mainfrom
Open
fix(cmd): add --user flag to agent chat for user_id authentication#714stanleykao72 wants to merge 1 commit intonextlevelbuilder:mainfrom
stanleykao72 wants to merge 1 commit intonextlevelbuilder:mainfrom
Conversation
The CLI agent chat command connects via WebSocket but never sends user_id in the connect params. The gateway requires user_id for chat.send, making the CLI unusable for any agent interaction. All other clients (browser, Telegram, LINE, etc.) send user_id during connect. The CLI was the only channel missing it. Adds --user / -u flag that passes user_id in the connect frame. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Test Plan VerificationTested on a staging build of Scenario 1:
|
stanleykao72
added a commit
to stanleykao72/goclaw
that referenced
this pull request
Apr 16, 2026
…staging verification evidence
Capture the live LINE staging session and the CLI smoke run carried out
on 2026-04-16 against the e-smith-borrowed channel and the staging goclaw
binary built from feat/line-channel-clean.
- test-evidence/pr715-line-staging.md: 1:1 PASS (5+ events), image PASS
(3 vision attaches), group STAGING CONSTRAINED by LINE OA Manager
Chat-mode intercept (links to TestClassifySource_* unit tests for
code-path coverage), multi-agent PASS by unit test
(TestMultiChannelHookIsolation) with single-agent staging fallback.
- test-evidence/pr714-cli-smoke.md: three CLI scenarios all PASS —
--user success, no --user backward-compat fail, interactive REPL
multi-message session persistence.
These files live in esmith/main only; PR nextlevelbuilder#715 itself does not include
this directory. PR body links to test-evidence URLs on the fork for
reviewers who want the full transcript.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
goclaw agent chatnever sendsuser_idin the WebSocket connect frameuser_idforchat.send, so the CLI always fails withuser_id is requireduser_idduring connect — CLI is the only channel missing itChanges
cmd/agent_chat.go: Add--user/-uflagcmd/agent_chat_client.go: Passuser_idin connect paramsUsage
Test plan
goclaw agent chat --name default --user testuser -m "hello"→ agent responds (nouser_id is requirederror) → verifiedgoclaw agent chat --name default -m "hello"(no--user) → still fails withuser_id is required(backward compatible, no silent default) → verified--userflag → works across multiple messages in same session → verified🤖 Generated with Claude Code