Skip to content

fix(terminal): prevent project action commands from getting stuck - #8

Merged
amitray007 merged 2 commits into
alphafrom
fix/alpha-project-action-terminal
Aug 16, 2026
Merged

fix(terminal): prevent project action commands from getting stuck#8
amitray007 merged 2 commits into
alphafrom
fix/alpha-project-action-terminal

Conversation

@amitray007

Copy link
Copy Markdown
Member

What Changed

  • Prevent project-action commands from getting stuck above the prompt when the terminal has not been opened yet.
  • On supported POSIX shells, run the initial action after interactive shell initialization and return to the normal shell when it exits.
  • Keep the terminal usable after Ctrl+C stops a long-running initial action.
  • Preserve the existing terminal-write fallback for running terminals, Windows, unsupported shells, older servers, and restart paths the server does not handle.

This carries the implementation commit from pingdotgg/t3code#6338 without behavioral changes. Its stable patch ID matches the upstream PR. An Alpha feature record marks the delta as temporary and records the compatibility invariants required during upstream reconciliation.

Why

Opening a fresh terminal and immediately writing a project action can race interactive shell initialization. Commands such as npm run dev may then remain above the prompt without executing. Passing the command during supported shell startup removes that race, while the server acknowledgement keeps every existing fallback path intact.

Related

UI Changes

BeforeAfter
Project action stuck before terminal initializationProject action running after terminal initialization

Validation

  • vp test run packages/contracts/src/terminal.test.ts apps/server/src/terminal/Manager.test.ts — 80 tests passed
  • vp run --filter @t3tools/contracts typecheck
  • vp run --filter t3 typecheck — passed with existing Effect suggestions outside the changed terminal code
  • vp run --filter @t3tools/web typecheck
  • Targeted vp lint and vp fmt --check
  • git diff --check
  • Stable patch ID matches the complete upstream PR implementation
  • The upstream PR records a successful interactive retest of execution, Ctrl+C, and terminal reuse; that runtime pass was not repeated for this Alpha carry

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for the UI change
  • I included a video for the interaction change

Implemented by GPT-5.6 via the Codex harness in T3 Code.

@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Aug 16, 2026
@amitray007amitray007 self-assigned this Aug 16, 2026
@github-actions

github-actionsBot commented Aug 16, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB12.6 KiB+12 B (+0.1%)15.1 KiB
CodexThread snapshot wire6.3 KiB6.3 KiB−6 B (−0.1%)7.3 KiB
CodexLive turn WebSocket wire6.3 KiB6.3 KiB+18 B (+0.3%)7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB51.8 KiB0 B (0.0%)66.4 KiB
CodexLive turn messages16160 (0.0%)21
ClaudeTotal thread wire12.6 KiB12.6 KiB−23 B (−0.2%)15.1 KiB
ClaudeThread snapshot wire6.3 KiB6.3 KiB−7 B (−0.1%)7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB6.3 KiB−16 B (−0.2%)7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB52.7 KiB0 B (0.0%)66.4 KiB
ClaudeLive turn messages16160 (0.0%)21

Baseline: a4cd705 · PR result: 5ece4d8 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 99.9 KiB
  • Claude decoded thread snapshot: 100.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@amitray007
amitray007force-pushed the fix/alpha-project-action-terminal branch from de3f0ea to 5ece4d8CompareAugust 16, 2026 02:54
@amitray007
amitray007 merged commit 479e527 into alphaAug 16, 2026
12 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:Lvouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@amitray007