Repository navigation
sidecall: read a verbose Claude Code reply; a failed proposer call skips its tick - #164
Merged
Saksham Uboweja (SakshamUboweja) merged 1 commit intoNov 8, 2026
Conversation
…ips its tick With "verbose": true in the person's Claude Code settings, `claude -p --output-format json` prints the whole event list instead of one result object, so every Claude Code side call failed, and the micro-skills proposer's unguarded call aborted the fold (microsoft#131). - sidecall.claude_json: the result object from either shape, {} for none; claude_call and the toolprune measure probe both read it. - claude_call: an is_error result is no reply, not the proposer's text, and a signed-out one pauses the host's side calls as intended. - Distiller._maybe_propose: a runner that raises skips the tick instead of the fold, and counts as the tick, so a failing CLI is not retried at every fold. - runner_for: a side call that raises leaves one line in errors.log before it propagates, for the judge and the proposer alike. Never the command: most hosts take the prompt on argv, and `te doctor` prints the log's tail. Fixes microsoft#131. Builds on the approach in microsoft#134 by @dhruv1220 and the follow-up commit there.
Saksham Uboweja (SakshamUboweja)
marked this pull request as ready for review
November 8, 2026 00:56
Saksham Uboweja (SakshamUboweja)
merged commit Nov 8, 2026
cb42207
into
microsoft:main
10 checks passed
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.
Fixes #131. With
"verbose": truein Claude Code's user settings,claude -p --output-format jsonprints the whole event list (system,assistant, ...,result) instead of one result object. Every Claude Code side call then failed, and because the micro-skills proposer called its runner without a guard, the failure aborted the whole fold.This builds on the approach in #134 by Dhruv Arora (@dhruv1220) and the follow-up commit pushed there: read the
resultevent rather than pass--settings '{"verbose":false}', and let a failed proposer call skip its tick. Thanks to Raymond Manaloto (@sortakool) for the detailed report in #131.What changed
sidecall.claude_json(stdout)returns the result object from either shape: the plain object, or the lasttype == "result"event in a list, and{}for anything else. It is shared byclaude_calland by thete toolprune measureprobe (toolcheck._prompt_tokens), which had the samedata.geton a list and would also have crashed with verbose on.claude_calltreats anis_errorresult as no reply. Before this change, an error result such as"Invalid API key · Please run /login"has a non-emptyresult, so it came back as the proposer's or judge's text. It also skipped_no_reply, so the signed-out pause never triggered for Claude Code. It now goes through_no_replylike an empty reply.Distiller._maybe_proposecatches a runner exception and skips the tick instead of the fold, as the loop guard's judge already does. The failed call still counts as the tick (last_propose = now), so a CLI that keeps failing is tried everyPROPOSE_EVERYsessions, not at every fold.runner_forwraps each host's call so that one that raises leaves one line inerrors.logbefore it propagates (sidecall claude: no reply (timed out after 180s),... (exit 2),... failed (RuntimeError: ...)). This covers the proposer and the judge on every host. It never logs the command or a traceback: most hosts take the prompt on argv, aTimeoutExpiredprints its whole command, andte doctorshows this log's tail, which people paste into issues. It does not touchplugin/fold.py, so it does not conflict with microskills: addte microskills forget/unforget#160 (checked withgit merge-tree).Tests
tests/test_claude_verbose_reply.py:claude_jsonon the object, the verbose list, a list with no result, several results, non-dict JSON, invalid and empty output.claude_callwith a verbose reply returns the text and its usage. With no result event it comes back empty and is noted.is_errorresult, plain or verbose, is no reply and pauses a signed-out host.errors.log, without the prompt.python -m pytest tests experiments/tests: everything passes exceptexperiments/tests/test_fleet_budget.py::test_an_unwritable_cgroup_warns_and_never_fails_the_launch, which fails the same way onmainin this environment (cgroup setup, unrelated).