CLI: show task outputs (branch, PR, cost) when --watch completes#381
Open
axon-agent[bot] wants to merge 1 commit intomainfrom
Open
CLI: show task outputs (branch, PR, cost) when --watch completes#381axon-agent[bot] wants to merge 1 commit intomainfrom
axon-agent[bot] wants to merge 1 commit intomainfrom
Conversation
When using `axon run -w`, the watchTask function previously only printed phase transitions (e.g. "task/xyz Succeeded") with no indication of what the agent actually produced. New users would need to know to separately run `axon get task <name>` to discover the PR URL, branch name, commit SHA, or token usage. This change makes watchTask print key results (branch, pr, commit, cost-usd, input-tokens, output-tokens) immediately after the task reaches a terminal phase, so the most useful outputs appear right in the terminal where the user is waiting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Problem
When using
axon run -w(watch mode), the current output is:No indication of what the agent actually produced — the PR URL, branch name, commit SHA, or token cost are silently discarded. New users have to separately discover and run
axon get task <name>to see results, which is not obvious.The
-wflag is highlighted in the Quick Start (axon run -p "..." -w) so this is the primary UX path for new users.Fix
After the task reaches a terminal phase (Succeeded or Failed),
watchTasknow prints the populated result fields inline:Only fields with non-empty values are shown. Tasks with no results (e.g. simple one-off prompts with no workspace) print nothing extra — no change in behaviour for those cases.
Test plan
printTaskResultscovering: PR+branch+commit, cost+tokens, empty results, empty individual valuesmake testpassesmake verifypasses🤖 Generated with Claude Code
Summary by cubic
Shows task outputs (branch, PR, commit, cost, tokens) when axon run -w completes, so users see results immediately without running axon get task.
Written for commit da65458. Summary will update on new commits.