fix: the CLI's agent default could not write (#165) - #170
Merged
Conversation
`session_executor.DEFAULT_AGENT_COMMAND` carries `--permission-mode acceptEdits`. The CLI's `--agent` default was a second, separately written string that did not. So `run --session-host` without the flag produced an agent that was refused every `Edit`. What that looks like from outside is the problem. The agent finishes cleanly, the harness reports `no_changes`, and the item fails as "the agent made no changes" — indistinguishable from a model that considered the task and declined. The agent's own account was in a session scrollback nothing reads: "every write to the working tree is being denied by the permission layer … The files themselves are writable, so this is the harness permission mode, not the filesystem. I'm not going to route around a declined permission via shell redirection." It then wrote out the complete change it would have made. Correct behaviour throughout, recorded as producing nothing, and it cost a full agent run — minutes of a real CLI agent rather than one API call. The CLI now takes the executor's command rather than declaring its own. The test asserts that relationship rather than the string, because the defect was a second default existing at all: a literal that happens to match today drifts again tomorrow, which is exactly what happened to the review rubric (#167). Part of #165. The remaining half of that issue — that a permission refusal still reports as `no_changes` — is untouched here and is the part that matters when the cause is a deployment rather than a flag. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
thedancingdeveloper
force-pushed
the
fix/cli-agent-default-cannot-write
branch
from
August 5, 2026 01:58
ecbfdb5 to
84e688e
Compare
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.
session_executor.DEFAULT_AGENT_COMMANDcarries--permission-mode acceptEdits. The CLI's--agentdefault was a second, separately writtenstring that did not. So
run --session-hostwithout the flag produced an agentthat was refused every
Edit.What it looks like from outside
The agent finishes cleanly, the harness reports
no_changes, and the itemfails as "the agent made no changes" — indistinguishable from a model that
considered the task and declined. The agent's own account sat in a session
scrollback nothing reads:
It then wrote out the complete change it would have made. Correct behaviour
throughout, recorded as producing nothing — and it cost a full agent run,
which in session mode is minutes of a real CLI agent rather than one API call.
The fix
The CLI takes the executor's command instead of declaring its own.
The test asserts that relationship rather than the string, because the defect
was a second default existing at all: a literal that happens to match today
drifts again tomorrow, which is precisely what happened to the review rubric
(#167).
Scope
This is half of #165. The other half — that a permission refusal still reports
as
no_changes— is untouched, and it is the half that matters when the causeis a deployment rather than a flag someone dropped.
All four gates green.
🤖 Generated with Claude Code