| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…t permission hang The sessionID filter in the run command's event loop was introduced before subagents existed (PR anomalyco#6319). When a subagent (task tool) triggers a permission request, the event carries the child session's ID, which differs from the main sessionID. The filter causes these events to be silently dropped. With --dangerously-skip-permissions, subagent permissions are never auto-approved, causing the process to hang indefinitely. Without it, subagent permissions are never auto-rejected either, same result. The TUI's sync.tsx does NOT filter by sessionID (it uses request.sessionID as key directly), confirming this filter is unnecessary. The SSE subscription is already per-instance via Bus.subscribeAll, so no unrelated events can arrive. Verified: - With fix: integration test passes (~14s), subagent permissions are correctly processed - Without fix: integration test times out (30s), reproducing the hang that external consumers (e.g. cc-connect) experience
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Sorry, something went wrong.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Sorry, something went wrong.
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR that addresses subagent permission handling: Related PR:
This PR is related because it also deals with permission propagation from nested subagents, which is the same core issue your PR addresses (subagent permissions not being processed correctly). However, PR #26427 (your current PR) appears to be the primary/only PR addressing the specific sessionID filter removal in run.ts. The other results are PRs about related functionality (permission flags, subagent delegation) but don't duplicate your specific fix. |
Sorry, something went wrong.
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Testing
Added an integration test (test/cli/cmd/run-permission.test.ts) that spawns opencode run --format json --dangerously-skip-permissions with a mock LLM server that triggers a task (subagent) tool call followed by a bash tool call inside the subagent, with permission: { bash: "ask" } configured to force a permission prompt from the subagent.
Verified: