Skip to content

Run interactive processes directly on the PTY#2868

Open
gaggle wants to merge 1 commit into
cachix:mainfrom
gaggle:fix/interactive-process-pty
Open

Run interactive processes directly on the PTY#2868
gaggle wants to merge 1 commit into
cachix:mainfrom
gaggle:fix/interactive-process-pty

Conversation

@gaggle
Copy link
Copy Markdown

@gaggle gaggle commented May 22, 2026

I was seeing interactive processes via process-compose (process-compose.is_interactive = true)
not properly receiving input:

Screenshot of process-compose running a Python3 REPL interactive process that ignores input

Claude says it's because devenv-tasks capture the child's stdout/stderr on pipes, causing the interactive program to never own the process-compose PTY for output. And thus: no prompt appeared, output was block-buffered, and a REPL looked dead.

With this change interactive processes now bypass devenv-tasks and use their exec directly, so process-compose runs them straight on its PTY.

But.. that also means an interactive process no longer goes through devenv-tasks, so its before/after task dependencies and DEVENV_TASK_* env injection mechanisms are not applied. Is that acceptable?

I'm not sure that I'm enough of an expert to understand the full implication of this change, and I can't seem to run the tests locally (getting Problem with the SSL CA cert errors) so I worked blind. But I'm providing this PR in case a maintainer can verify it adds value or can provide feedback on how this might be better approached.

@gaggle gaggle marked this pull request as draft May 22, 2026 17:09
I was seeing interactive processes (`process-compose.is_interactive = true`)
not properly receiving input. Claude says it's because devenv-tasks capture
the child's stdout/stderr on pipes, causing the interactive program to never
own the process-compose PTY for output. And thus: no prompt appeared,
output was block-buffered, and a REPL looked dead.

With this change interactive processes now bypass devenv-tasks and use their
`exec` directly, so process-compose runs them straight on its PTY.

But.. that also means an interactive process no longer goes through
devenv-tasks, so its before/after task dependencies and DEVENV_TASK_* env
injection mechanisms are not applied. Is that acceptable?

I'm not sure that I'm enough of an expert to understand the full implication
of this change. But I'm providing this PR in case a maintainer can verify it
adds value or can provide feedback on how this might be better approached.
@gaggle gaggle force-pushed the fix/interactive-process-pty branch from 60aaea4 to 35f02f0 Compare May 22, 2026 17:15
@gaggle gaggle changed the title tests: add process-compose-interactive (failing) Run interactive processes directly on the PTY May 22, 2026
@gaggle gaggle marked this pull request as ready for review May 22, 2026 17:25
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