Skip to content

fix(tmux): fail fast on prompt-accepted idle tui sessions#210

Merged
Yeachan-Heo merged 2 commits intodevfrom
clawhip-issue-206-idle-tui-detection
Apr 11, 2026
Merged

fix(tmux): fail fast on prompt-accepted idle tui sessions#210
Yeachan-Heo merged 2 commits intodevfrom
clawhip-issue-206-idle-tui-detection

Conversation

@Yeachan-Heo
Copy link
Copy Markdown
Owner

Summary

  • fail fast when prompt submit is recorded but the pane shows no bounded progress
  • detect global clawhip hook installs while preserving test isolation
  • serialize env-mutating prompt-deliver tests to avoid flake

Test

  • cargo test prompt_deliver -- --nocapture

Closes #206

@Yeachan-Heo Yeachan-Heo merged commit 1fa0ddc into dev Apr 11, 2026
12 checks passed
@Yeachan-Heo Yeachan-Heo deleted the clawhip-issue-206-idle-tui-detection branch April 11, 2026 10:06
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b434b0fd9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


Some(HookSetup {
workdir: root.to_path_buf(),
marker_path: root.join(PROMPT_SUBMIT_MARKER),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Track prompt-submit marker in pane workdir for global hooks

When global hook detection is used, hook_setup_at is called with root = $HOME, so this sets marker_path to $HOME/.clawhip/state/prompt-submit.json. The generated native hook writes prompt-submit state to join(repoRoot, '.clawhip', 'state', 'prompt-submit.json') (in maybeWritePromptSubmitState), where repoRoot is derived from the pane's current repo/cwd, not $HOME. As a result, deliver() polls the wrong marker file for global-only installs and can fail after all Enter retries even though prompt submit events are recorded.

Useful? React with 👍 / 👎.

Comment thread src/cli.rs
pub provider: Vec<HookProvider>,
/// Install at the project root or in the user's global provider config.
#[arg(long, value_enum, default_value_t = HookInstallScope::Project)]
#[arg(long, value_enum, default_value_t = HookInstallScope::Global)]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0 Badge Preserve backward-compatible default scope for hooks install

This flips the default hooks install scope from project to global, which is a breaking CLI behavior change: existing automation that relied on running clawhip hooks install in a repo will now mutate ~/.codex/~/.claude instead of the project, altering where hooks are registered without any flag change. Given the compatibility requirement for CLI surfaces, this default change should not happen silently.

Useful? React with 👍 / 👎.

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