Maya: Welcome to Claude Code Review. Hi, I'm Maya. Today: self-hosted runner hold flags, MCP Tasks and Elicitations, a hook that answers Claude's questions, replaying history to test a guard rule, and writing specifics in CLAUDE.md.
James: And I'm James. Let's get into it.
Maya: So, Claude Code's two point one point three one one release added two flags to the self-hosted-runner command: hold idle file and max hold min. A self-hosted runner is a machine your team supplies to run jobs instead of Anthropic's cloud.
James: Right, and the problem is specific, Maya. A session finishes and goes idle while a dev server or long test suite it started keeps running. Without a signal, the runner frees the slot and that process gets orphaned or killed.
Maya: Exactly right, and the fix is a hold mechanism. You point hold idle file at a file your host updates while it still needs the session. As long as that file keeps changing, Claude Code leaves the slot alone.
James: And max hold min caps the wait, so a process that never finishes doesn't tie up a slot forever. One note: these apply only to self-hosted runner sessions, not jobs on Anthropic's own cloud.
Maya: Next, James, Anthropic shipped two MCP additions inside the Claude Code CLI on October twenty-third: Tasks and Elicitations, per a post from ClaudeDevs. Anthropic says both are rolling out to more Claude products soon, without naming which or when.
James: That's the key detail, Maya. Anthropic links two doc sections, one titled MCP tasks for server authors, another titled respond to MCP elicitation requests. The titles suggest Tasks hands back a long-running job without blocking, and Elicitations pauses to ask for a missing detail.
Maya: And worth stressing, the announcement itself does not confirm that behavior. For plugin builders, Anthropic simply points server authors to its MCP documentation under those task authoring and elicitation sections, without detailing the underlying mechanism.
James: Story three. A hook is a small script that runs automatically when something happens in Claude Code. A PermissionRequest hook can answer the multiple-choice prompts Claude shows mid-run, so a session you aren't watching keeps going instead of waiting at the terminal.
Maya: Right, James, and here's the flow. Claude uses the AskUserQuestion tool. On stdin the hook gets JSON with the questions array, then you copy tool input, add an answers object mapping each question to a chosen label, and return it as updated input with behavior allow.
James: Exactly, and Claude then prints user answered Claude's questions and continues, no terminal prompt. This was tested on two point one point two eight three. The same pattern forwards questions elsewhere, like Lidnight sending options to an encrypted phone status page.
Maya: And two limits matter. Returning allow alone doesn't answer the question, it stays open and the session keeps waiting. And the hook blocks until it returns, so a remote-answer hook must give up before the timeout so the terminal prompt still works.
James: Story four. Claude Code keeps each session's history, and every Bash call records the exact command and folder. That history is a ready-made test set for a PreToolUse hook, a script that checks each command before Claude runs it and can refuse it.
Maya: And the rules-guard developer shows why that matters, James. A first version looked for staging near a push and blocked thirty-three commands, but twenty-seven should have gone through. Most were gh pr create base staging, the exact move the agent was supposed to make.
James: That's the lesson. You replay old commands through the decision function with everything stubbed out, save each decision, then diff against the last run. Their replay over ten thousand eight hundred fifty-one commands found fifteen that should block, and the rewrite blocked all fifteen, nothing else.
Maya: And rules-guard is MIT licensed with no network calls. Protected-branch pushes, plain force pushes and production kubectl and AWS calls are blocked by default. Stricter personal rules, like AI attribution lines, are optional and off by default.
James: Last one, Maya. Vague lines like keep everything clean or make the UI beautiful tell Claude nothing it can act on. Rewrite each into specifics: use large product imagery, generous spacing, and restrained controls on storefront pages.
Maya: Exactly right, and the reason is the attention budget. Claude keeps loading CLAUDE.md while it works, so every line competes for attention. Common guidance says stay well under two hundred lines, but if everything useful fits in thirty or forty, that is better.
Maya: That's your Claude Code Review briefing.