You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat(cli): let a shell outlive the turn that opened it (#275)
The registry landed in #273 owned by a single runAgent call, so a shell opened
in one turn was closed before the next began — a slower Bash with extra steps.
The whole point of a shell that keeps its working directory is that the next
message still has it.
The REPL now owns one registry for the session and threads it through every
turn, the same way it already owns the background-task manager. `cd`, `export`,
and an activated virtualenv now survive from one message to the next.
`/shells` lists what is open and where each started; `/shells close <id>` closes
one and whatever is still running in it. That command is part of this change
rather than a follow-up: making these processes outlive a turn is exactly what
creates the need to see and stop them.
Cleanup is a wrapper, not a habit. `startRepl` closes every shell in a finally,
so it also runs when the session ends by throwing — these are real processes in
their own process group and do not die with the CLI.
Background tasks and sub-agents deliberately do not share the session's shells.
Two agents interleaving commands in one shell would each be wrong about its
state, so they get their own, closed when their run ends. A test pins that,
including an assertion that the delegation actually happened — otherwise it
would pass for the wrong reason if Task were ever missing from the registry.
Co-authored-by: t <t@t>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|`/background`| ✓ | ✓ | ✅ — runs a prompt as a background sub-agent via the session TaskManager (alias `/bg`); agent-started TaskCreate tasks appear too |
53
53
|`/batch`| ✓ | ✗ | 🔄 — batch-of-prompts not yet wired (use `/background` per prompt) |
54
54
|`/tasks`| ✓ | ✓ | ✅ — lists this session's background tasks; `/tasks <id>` shows one's status + output |
55
+
|`/shells`| ✗ | ✓ | 🆕 DeepCode-only — lists this session's persistent shells; `/shells close <id>` closes one |
55
56
|`/plan`| ✓ | ✗ | 🔄 — set via `/mode plan` in DeepCode |
0 commit comments