Skip to content

Await auto-update before interactive tmux handoff#51

Merged
axeldelafosse merged 1 commit intomainfrom
codex/interactive-tmux-auto-update
Mar 27, 2026
Merged

Await auto-update before interactive tmux handoff#51
axeldelafosse merged 1 commit intomainfrom
codex/interactive-tmux-auto-update

Conversation

@axeldelafosse
Copy link
Copy Markdown
Owner

Summary

  • await the silent auto-update check before launching promptless paired tmux startup (loop / loop --tmux outside tmux)
  • keep all other startup paths on the existing fire-and-forget auto-update flow
  • add CLI and update-module coverage for awaited sequencing, timeout behavior, and mutual exclusion

Why

Interactive paired tmux startup already spends a few seconds handing off into tmux. That makes it a good place to perform the best-effort update check synchronously, while avoiding extra delay in the rest of the CLI.

Root cause

Auto-update was previously kicked off the same way for every normal CLI invocation, before the CLI knew whether it was entering the promptless paired tmux handoff path. That meant the interactive tmux startup could not intentionally await the update check without risking duplicate checks.

Validation

  • bun run fix
  • bun test tests/loop.test.ts tests/loop/update.test.ts
  • bun run check
  • bun test

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a mechanism to await auto-update checks during specific CLI startup scenarios, specifically for promptless paired tmux launches initiated outside of an existing tmux session. It adds a new awaitAutoUpdateCheck function with a configurable timeout (defaulting to 5 seconds) and refactors the existing auto-update logic to support both synchronous and asynchronous execution. Comprehensive tests were added to verify the timeout behavior and the correct ordering of update hooks. I have no feedback to provide as no review comments were submitted.

@axeldelafosse axeldelafosse changed the title [codex] Await auto-update before interactive tmux handoff Await auto-update before interactive tmux handoff Mar 27, 2026
@axeldelafosse axeldelafosse marked this pull request as ready for review March 27, 2026 22:37
@axeldelafosse axeldelafosse merged commit 4793c39 into main Mar 27, 2026
2 checks passed
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