Skip to content

[codex] Keep PTY spawn errors structural#3325

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/structure-pty-spawn-errors
Jun 20, 2026
Merged

[codex] Keep PTY spawn errors structural#3325
juliusmarminge merged 1 commit into
mainfrom
codex/structure-pty-spawn-errors

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • derive PtySpawnError.message exclusively from adapter and shell context
  • retain the exact nested spawn cause for stack traces and diagnostics without copying its message
  • add a focused regression test for the structural messages and full cause chain

Validation

  • vp test apps/server/src/terminal/PtyAdapter.test.ts
  • vp check (passes with 20 pre-existing warnings)
  • vp run typecheck

Note

Low Risk
Localized change to error string formatting for PTY spawn failures; cause chaining and spawn behavior are unchanged.

Overview
PtySpawnError.message no longer appends the nested cause’s error text. User-facing strings are built only from adapter, optional shell, and optional attemptedShells (e.g. terminal-manager retry lists).

The cause field is unchanged and still chains the original spawn failure for stacks and diagnostics—only the duplicated message in message is removed.

Adds PtyAdapter.test.ts to lock in those messages and assert managerError.cause → adapterError.cause → spawnCause.

Reviewed by Cursor Bugbot for commit eeefcaa. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Remove cause message concatenation from PtySpawnError.message

PtySpawnError.message previously appended the underlying cause's message string, mixing structured error context with raw exception text. The message now includes only the adapter, shell, and attemptedShells fields; the full cause chain remains accessible via the cause property. Tests in PtyAdapter.test.ts verify the new message format and cause chain behavior.

Macroscope summarized eeefcaa.

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 153db6b6-928f-44e0-9118-3d46affa99ff

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/structure-pty-spawn-errors

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Minor change to error message formatting that removes duplication of cause messages while preserving the full error cause chain. The added test verifies the structural error handling remains intact.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge
juliusmarminge merged commit 7a8bab5 into main Jun 20, 2026
16 checks passed
@juliusmarminge
juliusmarminge deleted the codex/structure-pty-spawn-errors branch June 20, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR 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