Skip to content

A running script's shells stay out of the background pill (opencode#66402) - #1273

Merged
Hona merged 2 commits into
devfrom
upstream-f/script-shells-pill
Nov 26, 2026
Merged

Hona merged 2 commits into
devfrom
upstream-f/script-shells-pill

Conversation

@Hona

@Hona Hona commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Port of the app part of opencode#66402 (dfce18305d, UP-241: keep a running script's shells out of the background pill).

What changes

A Code Mode script that is still running in the conversation may start shells. Those shells belong to the script's row and must not be counted in the background pill above the composer.

Official Ours before Ours now
How a running script's shell is known the shell names its execute call (metadata.callID), packages/app/src/session/requests/background.ts:208-209; else by the calls the script lists, :210 only by the calls the script lists (start time and command) the same two ways, in that order (features/subagents/src/shells/mod.rs running_for)
A shell whose own call ended while it runs (it has a running job) not held by the script any more: it shows in the pill, background.ts:196-199 n/a the same: a running shell job's shell is not matched by its call

How

  • Shell takes call from metadata.callID (empty when the server names none).
  • running_for keeps a running execute call's id beside its start time and commands, and reads the running shell jobs from the job tracker.

One file (features/subagents/src/shells/mod.rs); no manifest, lock, profile or plugin contract change.

Verification

  • All 4/4 live-server cases passed on Windows x64 PR build (6d78b81cb, run 45704937979) beside a before build (278f9aaf38):
    • Case 1 (running script shell with metadata.callID, empty toolCalls): background pill hidden (NONE); before: "1 shell".
    • Case 2 (script shell + user shell without callID): background pill shows "1 shell"; before: "2 shells".
    • Case 3 (script shell with running Job.Shell timeout job): background pill shows "1 shell".
    • Case 4 (older server without callID, toolCalls listing command): background pill hidden (NONE).
  • Forward-merged origin/dev into branch (8faf5fa686, 0 overlapping files) to verify cleanly on the current Rune pin before merge.
  • Not run: real window, macOS, Linux.

…6402)

A shell names the call that started it (metadata.callID): for a script's shell, the script's execute call. A running execute call now holds the running shells that name it, unless the shell has a running job of its own (its call ended while it runs); a server that names no call is matched by the calls the script lists, as before. Official: packages/app/src/session/requests/background.ts:196-210.
Hona added a commit that referenced this pull request Nov 25, 2026
#1274)

Four new official commits since 57551d990d: two of the server's are skipped (6e01a86973, 29c4e472d4). UP-241 (dfce18305d: a running script's shells stay out of the background pill) is ported in a draft, #1273, not run. UP-242 (028cd6ce91: question answers submitted with Enter, with a setting for Cmd/Ctrl+Enter) is not ported yet.
@Hona
Hona marked this pull request as ready for review November 26, 2026 06:32
@Hona
Hona merged commit f237eea into dev Nov 26, 2026
7 checks passed
@Hona
Hona deleted the upstream-f/script-shells-pill branch November 26, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant