Skip to content

fix(tui): handle prompts for resumed sessions - #46307

Open
OpeOginni wants to merge 2 commits into
anomalyco:v2from
OpeOginni:startup-prompt-fork
Open

fix(tui): handle prompts for resumed sessions#46307
OpeOginni wants to merge 2 commits into
anomalyco:v2from
OpeOginni:startup-prompt-fork

Conversation

@OpeOginni

@OpeOginni OpeOginni commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #14349
Closes #8850
Closes #21829
Closes #29262

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  • Adds --fork to the full TUI command and forwards it to the TUI.
  • Rejects --fork unless --session or --continue selects a source session.
  • Makes explicit --session take precedence over --continue, avoiding competing startup navigation.
  • Submits --prompt to the selected or forked session.
  • Consumes the startup prompt after submission so opening a new session does not replay it.

How did you verify your code works?

  • Ran bun test test/mini.test.ts from packages/cli.
  • Ran bun test test/context/args.test.tsx from packages/tui.
  • Ran bun typecheck from packages/cli.
  • Ran bun typecheck from packages/tui.
  • Ran targeted oxlint with no new errors.

The repository-wide pre-push typecheck is currently blocked by unrelated RequestEvent.locals errors in packages/console/app.

Screenshots / recordings

Before

Screen.Recording.2026-08-30.at.23.24.20.mov

After

Screen.Recording.2026-08-30.at.23.26.52.mov

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search results, I found one directly related PR:

Related PR:

This is mentioned in the current PR's description as the V2 follow-up. The current PR (46307) is extending the functionality introduced in #14442 to support --fork with prompts in the full TUI command, adding validation that --fork requires --session or --continue, and establishing precedence rules between these flags.

No duplicate PRs found

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@OpeOginni OpeOginni changed the title fix(tui): support prompts when forking sessions fix(tui): handle prompts for resumed sessions Aug 30, 2026
@OpeOginni

Copy link
Copy Markdown
Contributor Author

Based of old V1 PR #14442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant