`session.create` deadlocks when a `SessionFsProvider` is bound
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 74/100
Research direction
Start in rust/src/session.rs at start_prepared_create, call_with_inline_callback, and spawn_event_loop, then compare the ordering with session.resume. Reproduce the hang using a bound SessionFsProvider and a scripted CLI that sends sessionFs.stat during create; done means create completes within a bounded timeout and the regression test fails on the current implementation.
Written by the indexing model from the issue text.
Description
Repo/version: github/copilot-sdk, tag rust/v1.0.14 (e60d9037); CLI runtime cli-1.0.84-5.
Behaviour: With a SessionFsProvider bound on the client, session.create never returns. The CLI issues sessionFs.* requests during create; nothing on the client side answers them yet, so the RPC waits forever (RpcSessionFs carries no request timeout).
Cause: start_prepared_create (rust/src/session.rs:1167) sends the session.create RPC (call_with_inline_callback, :1394) before it spawns the event loop (spawn_event_loop, :1419) that dispatches inbound sessionFs.* requests. session.resume spawns its event loop before its RPC (:1636) and does not hang.
Fix shape: Spawn the event loop for the non-cloud create arm before the RPC, as resume does. The inline stash grows from (SessionId, SessionRegistration) to (SessionId, Option<SessionChannels>, RegistrationToken) so the early loop takes the channels while the cancel-safety guard keeps the token. The existing guard cancels shutdown on every early return and the loop exits on shutdown.cancelled(), so no extra abort plumbing is needed.
Regression test: bind a provider, drive create against a scripted CLI that issues sessionFs.stat during create, assert create completes within a bounded timeout. Must time out on current code.
Downstream: a consumer of this crate carries a local patch for this and cannot drop it until it is fixed upstream.
- Dominant language
- Java
- Stars
- 10.5k
- Forks
- 1.5k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 130
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/copilot-sdk
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2760 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2759 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/copilot-sdk#2709 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
github/copilot-sdk#2673 ·
All issues in github/copilot-sdk
Similar issues
-
area/plugin
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kestra-io/plugin-kestra#190 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/rocketmq-dashboard#5064 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
wso2/dpdp-accelerator#287 ·