Browse Source

G-038 detail: subshell continuity note - piped `subshell <name>` landing interactive

User note recorded: with per-subshell configs (G-008/G-009), piping
`subshell <name>` then going interactive should reasonably land IN that
subshell (quit unwinding to the initial shell). Does not fall out of the
continuity changes automatically - the subshell stack is repl control flow
and unwinds at pipe-EOF under the current nested model. Options recorded:
re-enter captured subshell stack on restart (fights nesting) vs the natural
fit under G-002 non-nested subshells with console targeting (reattach
reopened console to innermost active subshell). Also noted: a -subshell
flag on the shell subcommand as the primary entry (G-032 launcher-args
candidate).

Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 1 week ago
parent
commit
b0f5911da0
  1. 18
      goals/G-038-piped-session-continuity.md

18
goals/G-038-piped-session-continuity.md

@ -58,6 +58,24 @@ The caller-driven restart already identified during G-036 as the clean fix direc
stamping by internals - the notice line should show the error message itself so the
user need not race to inspect.
Subshell continuity (user note 2026-07-08, support if practical - not in acceptance):
once per-subshell configurations exist (G-008/G-009), a user might reasonably run
`'subshell <somename>' | <punkexe>` and expect the interactive prompt to be IN that
subshell, with `quit` unwinding to the initial shell. This does NOT fall out of this
goal's changes automatically: continuity preserves code-interp state, but the subshell
stack is repl control flow - under the current synchronous nested model the piped
`subshell` command nests a repl on the same stdin, and pipe-EOF unwinds the whole
subshell stack before the restart decision is made, so the prompt would land in the top
shell (with the subshell's interp-side effects intact but the subshell exited). Options:
(a) within this goal - capture the active subshell stack at EOF and re-enter it on
restart (fights the nesting model); (b) the natural home - G-002's non-nested subshell
architecture with console targeting, where pipe-EOF becomes "reattach the reopened
console to the innermost active subshell" and quit unwinds normally. Record the outcome
here; if deferred to G-002, this note is the cross-reference. Related idea (separate
concern, launcher surface): a `-subshell <name>` flag on the `shell` subcommand as the
primary way to start inside a named subshell (candidate for the G-032 punk::args
launcher declarations when subshell configs exist).
Risks / interactions:
- The teardown-mode branching touches exactly the machinery mapped during G-036
(shellthread worker lifecycle, shellfilter::run tail, thread teardown ordering) - the

Loading…
Cancel
Save