skills: SESSION_BUSY is two CLI invocations, not an in-page lock - #405
Open
ayushsingh82 wants to merge 1 commit into
Open
skills: SESSION_BUSY is two CLI invocations, not an in-page lock#405ayushsingh82 wants to merge 1 commit into
ayushsingh82 wants to merge 1 commit into
Conversation
Agents modeled Session occupancy as a page-level lock: on a same- session concurrency task they stayed inside one `browser run` and overlapped two page.evaluate calls instead of issuing a second `webcmd --session <id> ...` process. Both in-page calls completed, no SESSION_BUSY envelope appeared, and the agent concluded the structured busy response didn't exist. SESSION_BUSY is produced by the Webcmd runtime arbitrating a second CLI invocation against a session another invocation still holds - it has no relationship to what happens inside one run's page.evaluate calls. - webcmd-browser: added a worked two-terminal example showing how to actually contend for a Session, a Do-Not line against in-page occupancy locks, and a sharper SESSION_BUSY troubleshooting row. - webcmd-usage: reworded the SESSION_BUSY explanation to name the two-invocation shape explicitly instead of "another holder." Skill-doc only change; the runtime already returns structured SESSION_BUSY correctly today. Fixes agentrhq#385
Contributor
Author
|
@ankitranjan7 mind taking a look? This closes #385. |
Contributor
🟢 No documentation gap found — medium confidenceThe automated review found no documentation gap in the supplied changes. This review is advisory and does not block merging. |
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 #385.
Problem
On a same-session concurrency task, an agent modeled Session occupancy
as a page-level lock: it stayed inside one
browser runand overlappedtwo
page.evaluatecalls instead of issuing a secondwebcmd --session <id> ...CLI invocation. Both in-page callscompleted, no
SESSION_BUSYenvelope appeared, and the agent concludedthe structured busy response didn't exist for this case — writing
twice instead of retrying safely.
SESSION_BUSYis produced by the Webcmd runtime arbitrating a secondCLI invocation against a Session another invocation still holds. It
has no relationship to anything that happens inside one
run'spage.evaluatecalls — the runtime already returns it correctly today(confirmed against
origin/main); the gap is that skill text didn'tmake the two-CLI-invocation shape impossible to miss.
Fix
webcmd-browser: added a worked two-terminal example (Terminal Aholds the Session with a long
run, Terminal B issues a second--sessioncommand against the same id), aDo Notline againstimplementing occupancy inside the page, and a sharper
SESSION_BUSYtroubleshooting row that says "retry the same command" and "do not
lock inside
page.evaluate."webcmd-usage: reworded theSESSION_BUSYexplanation to name thetwo-invocation shape explicitly instead of "another holder."
Skill-doc only change; no runtime/CLI behavior touched.
Test plan
npm run typecheck— clean.npm run test— 447 files / 5757 tests pass.make verify— skill build (skill-src/→skills/) in sync.src/skills.test.tsto assert the new in-page-lock anti-pattern text and the two-invocation wording.