diff --git a/goals/G-038-piped-session-continuity.md b/goals/G-038-piped-session-continuity.md index c3d03bdf..ef05065e 100644 --- a/goals/G-038-piped-session-continuity.md +++ b/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 ' | ` 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 ` 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