Repository navigation
Return Claude’s final answer to the calling agent - #1060
Merged
Merged
Conversation
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.
Claude Code sends its final answer in the Stop hook. Pebrel already parses that field for the answer reader, but a delegated task could report that no final message was available. The callback now returns the parsed answer to the calling pane and falls back to the existing provider diagnostic when needed.
Extracted from @yjjheizhu's #919. The regression covers the real hook parser and queued callback, including escaped text, the 4,000-character output limit, a provider error and a completion with no answer. The existing Codex callback test also runs in native CI. Architecture and workspace formatting passed locally. The local test launcher stopped before compilation because free disk space was below its 5 GiB minimum.