Skip to content

feat(claude): max-context configuration + Heady-optimal hooks/permissions#203

Open
HeadyMe wants to merge 1 commit into
mainfrom
claude/code-context-heady-optimize-gfl0f4
Open

feat(claude): max-context configuration + Heady-optimal hooks/permissions#203
HeadyMe wants to merge 1 commit into
mainfrom
claude/code-context-heady-optimize-gfl0f4

Conversation

@HeadyMe

@HeadyMe HeadyMe commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

Extends the Claude Code configuration (.claude/settings.json) for the full 1M-token context window and Heady-optimal operation. The seven Heady agentDefinitions (orchestrator, builder, auditor, researcher, observer, deployer, liquid-brain) are preserved unchanged; this PR adds context/permission/hook layers on top.

Maximum context

  • autoCompactWindow: 1000000 + env.ANTHROPIC_BETAS=context-1m-2025-08-07 — whole 1M window used before summarization (pair with a 1M-capable model, e.g. claude-opus-4-8[1m]).
  • autoCompactEnabled: true — long orchestration sessions summarize at the boundary instead of failing.
  • Raised token budgets via env: CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000, MAX_THINKING_TOKENS=32000, MAX_MCP_OUTPUT_TOKENS=50000 (the 7-server Heady MCP fleet returns large payloads).
  • effortLevel=xhigh, always-thinking + summaries, file checkpointing, 90-day retention.

Heady-optimal operation

  • enableAllProjectMcpServers: true — auto-approves the seven .mcp.json Heady servers.
  • Permissions — allow the Heady dev toolchain (git, npm/pnpm, node, python, jest/pytest, gitleaks); deny-read secrets (.env, .heady/**, keys); block/gate destructive commands.
  • SessionStart hook (hooks/session-context.sh) — injects live repo context each session.
  • PreToolUse(Bash) hook (hooks/guard-bash.sh) — hard-denies catastrophic commands; asks before destructive-but-legitimate ones. hooks/pre-commit-check.sh is untouched.

Verification

Both hooks pipe-tested with realistic payloads (SessionStart JSON valid; guard denies rm -rf / / force-push, asks on DROP TABLE, passes benign commands silently). settings.json validated with jq; 7 agentDefinitions confirmed preserved.

.claude/CONTEXT_OPTIMIZATION.md documents every knob (the pre-existing .claude/README.md is untouched).

Notes

The 1M window requires a 1M-capable model; it is intentionally not pinned in committed settings — select per session or in personal .claude/settings.local.json.

https://claude.ai/code/session_016WqBXQGJkjhG9RdAFiL2MZ


Generated by Claude Code

Extend the Claude Code config for the full 1M-token context window and optimal
operation in the Heady ecosystem. The seven Heady agentDefinitions are
preserved unchanged.

- autoCompactWindow=1000000 + ANTHROPIC_BETAS=context-1m-2025-08-07
- raised output/thinking/MCP token budgets (env)
- effortLevel=xhigh, always-thinking, file checkpointing, 90d retention
- enableAllProjectMcpServers for the 7-server Heady MCP fleet
- permissions: allow Heady dev toolchain; deny-read secrets; block/gate
  destructive commands
- SessionStart + PreToolUse(Bash) guard hooks (shared with heady-context)
- CONTEXT_OPTIMIZATION.md documenting every knob
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.

2 participants