# setup

Context windows, sessions, keys, and MCP configs. The plumbing around an agent.

## Articles

1. [Claude Code stops on a permission prompt when you are away. How to fix it.](/content/blog/claude-code-stuck-on-permission-prompt-afk/index.html)  
   An agent that sat on an approval prompt for an hour has a fix: change the permission mode, pre-approve the commands, and route the ones that still wait.

2. [How to Optimize Claude Code's Context Window (Without Just Buying a Bigger One)](/content/blog/optimize-claude-code-context/index.html)  
   Practical tactics for stretching Claude Code's context window: what to compact, what to delegate to subagents, and which plugins to disable first.

3. [Managing Claude Code API Keys Across Multiple Projects](/content/blog/api-key-management/index.html)  
   How to avoid leaking API keys across projects when using Claude Code, and a cleaner approach to per-project key management.

4. [Per-Project MCP Server Configs for Claude Code: Why and How](/content/blog/per-project-mcp-configs/index.html)  
   How to manage different MCP server configurations for each Claude Code project, and why a per-project setup prevents config headaches.

5. [The Case for a Persistent Claude Code Session Log](/content/blog/persistent-session-log/index.html)  
   Why your Claude Code session history should be persistent and browsable, not trapped in terminal scrollback that disappears when you close the tab.

6. [I Closed My Terminal and Lost Everything: How to Never Lose a Claude Code Session Again](/content/blog/lost-claude-code-session/index.html)  
   Lost a Claude Code conversation after closing your terminal? Why it happens and how to preserve your session history.
