Feature request: verbose & print mode together
Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 15 comments · opened Mar 6, 2025 · closed Apr 2, 2025
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
I'm very excited about this tool. Thank you for releasing it. I'd love to run this in a github action every time I comment "/claude-fix" in a PR review. I have this working using --print mode, but I would like to use --verbose mode non-interactively. --print only outputs a very high level summary at the end. That means I can't see the process to get there, and that in turns means I can't effectively iterate on my prompts.
15 Comments
Hey there! What sort of output would you expect for
--verbose-- would you want to see the whole conversation, as opposed to just the last message?Hi! Yes, the whole conversation would be ideal. Like if I ran it interactively and kept saying "yes". I specifically want to see what files it's editing, what commands it's executing and their outputs, and why.
For context I'm also using --dangerously-skip-permissions and I'm running in a docker container using the dockerfile and init_firewall scripts from your .devcontainer.
On further thought, the ideal would be to have the complete train of thought logged to a file, but still to output the succinct summary on stdout. That would allow me to grab the succinct summary in the happy case and use it as a commit message, and also to view the chain of reasoning if it goes off track.
To extend this request further: it would be nice to get out the whole trace at the end, AND be able to resume a conversation starting from that trace. i.e. to be able to transition from non-interactive to interactive if desired.
I've published the action here if you want to test with it: https://github.com/joesarre/claude-code-action/tree/v1. It's just the bit that runs claude code, not the full workflow as that is currently tightly coupled to my project
👍 to this feature. I use --print to enable "background process" where I'm able to set up N tasks and then have them execute in the background ("find 100 files with lint errors, and fan them out to 1 session per file to fix"). I still want to be able to later inspect the actions taken to understand what it did and why. It also allows for a meta "reprocessing" of the output to pass to another agent to ask questions EG "At any point in this session, did we decide to duplicate an element instead of reuse it?"
This probably ideally would look like a JSONL-ish log file with a line per action with meta descriptions about it (tool call, thinking, etc), and that is appended to in real time to be able to monitor the process as actions occur, without having to wait till the end.
@joesarre I took the liberty of forking your claude-code-action repo (and I'm sorry about all the accidental PRs back to your repo).
Really awesome stuff.
Using
--printmode in CI makes it super hard to understand when permissions are failing. It'll say "I had permissions issues doing X" but it doesn't really call out what command it ran so it's really hard to build the--allowedToolslist. I've tried adding things likeAs you work on this, please print any output to the file and well as a summary of each command you execute to ./.git/claude-code-output.txt with a timestamp.or
if you run into any issues please tell me which command failed and whybut never works
Also ran into this while trying to make a
bin/fix-issuescript. I have no idea if it's working, if it's failing, or what it needs, because no output shows up until it's done.This is shipped in 0.2.60! Docs incoming.
FWIW I've tried using this like:
And noticed that
--verboseand--printmean you are forced to use--json. Which makes some sense, but then the output is something you'd have to parse. When we use claude in CI, because it can take 5-10 minutes it's actually pretty nice to have the output streaming to console. @robstolarz setup a pretty convoluted but functional means of getting that behavior by spinning up an Overmind process that just continually presses the enter key to simulate a human doing so.Especially while we're experimenting with Claude in CI, having it run in a way where it's not outputting anything until the end is kinda scary, considering sometimes it tries to do...scary stuff (forking/creating repos).
Totally understand why it was implemented this way, but just figured I'd share the usability downside that is not immediately apparent.
I second what @maschwenk said, was not expecting forced json either. Also would love streaming printing there, especially for testing these "scripts".
Mind filing a separate issue for that request? I think it's worth tracking.
@ashwin-ant PTAL https://github.com/anthropics/claude-code/issues/733
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.