fix(tmux): fail fast on prompt-accepted idle tui sessions#210
fix(tmux): fail fast on prompt-accepted idle tui sessions#210Yeachan-Heo merged 2 commits intodevfrom
Conversation
There was a problem hiding this comment.
💡 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), |
There was a problem hiding this comment.
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 👍 / 👎.
| 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)] |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Test
Closes #206