fix(cli): session not found names the owning profile - #403
Open
ayushsingh82 wants to merge 1 commit into
Open
Conversation
SESSION_NOT_FOUND said "Session not found: <id>" even when the id existed under a different profile, and `session list` gave no visible signal that it was scoped to the selected profile. Agents omitting --profile on cleanup read this as the session never existed and either retried the same wrong command or inspected unrelated default-profile state. - SessionNotFoundError now looks up the owning profile and, when found, hints the exact `webcmd --profile <owner> session close <id>` retry. - `session list` includes a `profileId` column so scoping is visible in table output, not just implied by the selected profile. Fixes agentrhq#388
Contributor
🟠 Maintainer review suggested — low confidenceThe automated review could not reach a fully supported conclusion. Limitations
This review is advisory and does not block merging. |
Contributor
Author
|
@ankitranjan7 mind taking a look? This closes #388. |
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.
Fixes #388.
Problem
SESSION_NOT_FOUNDsaidSession not found: <id>even when the idexisted under a different profile, and
session listgave no visiblesignal that its output was scoped to the selected profile. Agents that
created sessions under a named profile and later ran
session closeor
session listwithout repeating--profileread the error as"session doesn't exist" and either retried the same wrong command or
inspected unrelated default-profile state.
Fix
SessionNotFoundErrornow looks up the session's actual owningprofile in the store and, when it differs from the selected one,
names it in the hint with the exact retry command:
webcmd --profile <owner> session close <id>. Falls back to theexisting generic hint when the id doesn't exist under any profile.
session listtable/JSON output now includes aprofileIdcolumn,so the output doesn't read as global when it's profile-scoped.
docs/troubleshooting.mdxand thewebcmd-browserskill'stroubleshooting table with the new behavior.
Test plan
npm run typecheck— clean.npm run test— 447 files / 5757 tests pass.make verify— skill build (skill-src/→skills/) in sync.src/browser/sessions.test.tsfor both theowning-profile hint and the fallback (unknown session id) hint.