Commit and push all changes
Assistant
Let me start by reading the instructions and then examine the failure logs.
Assistant
Now let me read the failing source files and check a few acceptance test logs for patterns.
Assistant
Let me check the acceptance test failures to see if they're all the same root cause or different issues.
Assistant
Let me check the orchestrator test failure more closely and understand the sandbox adapter wiring.
Assistant
Let me check how the server is started for tests and where
mockAgentis configured.Assistant
Now I have a clear picture of all failures. Let me fix them:
Typecheck errors:
sandbox-adapter.ts—PromptRequest/PromptResponsenot exported fromsandbox-agentroutes.ts:561— unusedstallDetector
Acceptance test failures: 3.
routes.ts:557— eagerly-createdPromise.rejectcauses unhandled rejections in all test suites 4.walking-skeleton.test.ts:65— expects"claude-agent-sdk"but code stores"claude"Assistant
Now fix the unused
stallDetectorin routes.ts:Assistant
Wait, AGENTS.md says "Avoid backwards-compatibility hacks like renaming unused _vars". Let me check if
stallDetectoris used elsewhere in the function or if the import can be dropped.Assistant
Now let me check if
stallDetectorImportis used elsewhere, and if not, remove the import too:Assistant
Only declared, never used now. Let me check if it's used anywhere else in the file:
Assistant
Now fix the eagerly-rejected promise that causes unhandled rejections in all test suites:
Assistant
Actually, let me simplify this. The issue is the eager
Promise.reject. A cleaner approach:Assistant
Now I need to update the usage of
sandboxAdapterPromiseto callresolveAdapter():Assistant
Now fix the last one that has a different pattern:
Assistant
Good, that one was already updated by the
replace_all. Now fix the test expectation:Assistant
Now let me run the typecheck to verify:
Assistant
Typecheck passes clean. Now let me verify the acceptance tests aren't broken by the lazy adapter change — let me run a quick targeted test:
Assistant
Let me also verify a non-orchestrator test suite doesn't get the unhandled rejection:
Assistant
All passing with no unhandled rejection errors. Here's a summary of the fixes:
4 issues fixed:
-
sandbox-adapter.ts—PromptRequestandPromptResponseare not exported by thesandbox-agentpackage (they're internal imports fromacp-http-client). Replaced with types derived fromSession's method signature:Parameters<Session["prompt"]>[0]andAwaited<ReturnType<Session["prompt"]>>. -
routes.ts:561— UnusedstallDetectorvariable. Removed the import and destructuring entirely since it wasn't referenced anywhere. -
routes.ts:557—Promise.reject(...)was created eagerly at route registration time. When non-orchestrator test suites boot the server, this immediately-rejected promise is never caught, causing "Unhandled error between tests" in all 27 acceptance test suites. Changed from an eager promise to a lazyresolveAdapter()function that only creates the rejection when actually called.
-
- User
Commit and push all changes
- User
/context context
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.