GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing github.com — fix(core): record user stops without waking idle sessions by kitlangton · Pull Request #46439 · anomalyco/opencode Conversation
|
| Action | Result |
|---|---|
| Stop a background shell or subagent | Show stopped by user, record the notice, and leave an idle parent asleep. |
| Stop a foreground shell or subagent | Return an intentional cancellation result instead of a tool failure. |
Stop a user-entered ! shell command |
Preserve the same user intent in its completion notice. |
| Continue the parent later | Deliver the recorded notice with an instruction not to restart unless asked. |
The explicit user-stop reason survives background-job recovery. Live and recovered notices use the existing admit-without-wake path; the TUI already displays pending synthetic messages, so no new delivery mechanism is needed.
Stop intent also survives event replay and stopping before a result waiter is attached. Quiet stop notices no longer keep the tab's busy indicator running; real execution and pending prompts still do.
Matched production-TUI recordings at base 5894e46688 and recorded change 961fb3918d, using the same real shell command and Ctrl+D interaction. Model responses are simulated. The before clip shows the failure notice and unsolicited follow-up; the after clip shows the intentional stop with the parent and its tab remaining idle. Both captures use the same viewport, are identically cropped for readability, and run at normal speed. The run records two model requests after versus three before. The change was subsequently rebased onto 3e9b009642, with test fixtures adapted to the new upstream layer-graph API.
This changes intentional user stops for shells and subagents, including their TUI presentation and replay behavior. Generic cancellation, failure, and server-shutdown recovery keep their existing execution and notification policies.
The rebase also updates the execution and Session-instance HTTP test fixtures to the upstream layer-graph replacement API so they continue to compile and run.
# packages/core bun run test test/session-shell.test.ts test/session-projector.test.ts test/session-message-update.test.ts test/job.test.ts test/session-execution.test.ts test/tool-subagent.test.ts bun run test test/tool-shell.test.ts --test-name-pattern 'intentional stop|user stop|initial progress|finishes before backgrounding' bun typecheck # packages/client bun run test test/solid-data.test.ts bun typecheck # packages/server bun run test test/fetch.test.ts bun run test test/session-instances.test.ts bun typecheck # packages/tui bun run test test/context/session-tabs.test.tsx test/component/session-tabs-status.test.tsx test/session-user-stop.test.tsx bun typecheck
Focused checks pass. Regression coverage includes idle-parent no-wake behavior, later notice delivery, durable event replay, stopping before result observation, interruption during initial progress, generic cancellation preservation, and light/dark TUI rendering. Real Ctrl+D flows were also exercised for tool shells, user-entered ! shells, and subagents, with wide and narrow shell layouts.
The unmodified pre-push hook also passed all 33 repository typecheck tasks.
The broader shell suite intermittently loses output from short-lived commands. The same failures were reproduced twice in an untouched worktree at the base revision; they are not fixed by this PR.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing this in favor of a different approach. Reviewing the diff made it clear that the user-stop reason had to be written into two places (the Job and the Shell) and kept in sync, and there is still a window between shell creation and job registration where they diverge. The cleaner fix is for Job to carry the producer's typed terminal outcome instead of classifying fiber exits into its own status, which removes the sync problem entirely. A replacement PR with that change is coming. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.