fix(bad): write session state to .claude/ instead of TMPDIR#5
Open
stephenleo wants to merge 3 commits intomainfrom
Open
fix(bad): write session state to .claude/ instead of TMPDIR#5stephenleo wants to merge 3 commits intomainfrom
stephenleo wants to merge 3 commits intomainfrom
Conversation
Store bad-session-state.json next to the statusline script in .claude/ so it persists reliably outside the sandbox-restricted temp directory. Gate-pre-continuation now reads from .claude/bad-session-state.json (relative to project root) — no setup-time path substitution required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…opped chain The ambiguous "stop at first file / skip bad-statusline.sh" wording caused the scan to halt at priority 2 when bad-statusline.sh was already installed, never reaching the original chain command (e.g. cship) at priority 4. Rewrite Step 1 as explicit skip-and-continue vs stop-and-capture branches. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e positives Firing the check exactly at resets_at risks hitting the API before the quota has fully cleared. Adding a 600s buffer ensures the window has settled before BAD re-checks and resumes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bad-session-state.jsonin.claude/(next to the statusline script) instead of the sandbox-restricted${TMPDIR:-/tmp}/bad-statusline.shnow resolves its own directory via$(dirname "$0")— no setup-time path substitution neededgate-pre-continuation.mdreads from.claude/bad-session-state.json(relative to project root)setup-statusline-hook.mdto matchTest plan
/bad setupon a fresh project and verify.claude/bad-session-state.jsonis created after the first API responsestatusLinecommand exists, the chained script also writes to.claude/bad-session-state.json🤖 Generated with Claude Code