feat(claude): max-context configuration + Heady-optimal hooks/permissions#1
Open
HeadyMe wants to merge 1 commit into
Open
feat(claude): max-context configuration + Heady-optimal hooks/permissions#1HeadyMe wants to merge 1 commit into
HeadyMe wants to merge 1 commit into
Conversation
Configure Claude Code for the full 1M-token context window and optimal operation in the Heady ecosystem: - autoCompactWindow=1000000 + ANTHROPIC_BETAS=context-1m-2025-08-07 so the whole context window is used before summarization - raised output/thinking/MCP token budgets (env) - effortLevel=xhigh, always-thinking, file checkpointing, 90d retention - enableAllProjectMcpServers for the Heady MCP toolchain - permissions: allow Heady dev toolchain; deny-read secrets (.env/.heady/keys); block/gate destructive commands - SessionStart hook injects live repo context each session - PreToolUse(Bash) hook denies catastrophic commands, asks before destructive ones (DROP TABLE, gcloud delete, wrangler delete) - README documenting every knob
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
Adds a Claude Code configuration (
.claude/) tuned for the full 1M-token context window and Heady-optimal operation. This repo previously had no.claude/config at all.Maximum context
autoCompactWindow: 1000000+env.ANTHROPIC_BETAS=context-1m-2025-08-07— the whole 1M window is used before any summarization (pair with a 1M-capable model, e.g.claude-opus-4-8[1m]).autoCompactEnabled: true— long sessions summarize at the boundary instead of hard-failing.env:CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000,MAX_THINKING_TOKENS=32000,MAX_MCP_OUTPUT_TOKENS=50000.effortLevel=xhigh, always-thinking + thinking summaries, file checkpointing, 90-day transcript retention.Heady-optimal operation
enableAllProjectMcpServers: true— auto-approves the Heady MCP toolchain..env,.heady/**, keys,*.pem); block/gate destructive commands.SessionStarthook (hooks/session-context.sh) — injects live repo context (branch, HEAD, present canonical configs, Stop Rule) at session start.PreToolUse(Bash)hook (hooks/guard-bash.sh) — hard-denies catastrophic commands (rm -rf /, force-push,mkfs, fork-bombs); asks before destructive-but-legitimate ones (DROP TABLE,gcloud … delete,wrangler … delete). Enforces the governance rule that irreversible actions need human confirmation.Verification
Both hooks were pipe-tested with realistic stdin payloads:
SessionStartadditionalContextJSON.rm -rf /and force-push, and asks onDROP TABLE.settings.jsonvalidated withjq..claude/README.mddocuments every knob.Notes
The 1M window requires a 1M-capable model; it is intentionally not pinned in committed settings so the team isn't forced onto one model/tier — select per session or in personal
.claude/settings.local.json.https://claude.ai/code/session_016WqBXQGJkjhG9RdAFiL2MZ
Generated by Claude Code