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.

View original on GitHub ↗

15 Comments

bcherny collaborator · 1 year ago

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?

joesarre · 1 year ago

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.

joesarre · 1 year ago

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.

dbieber · 1 year ago

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.

joesarre · 1 year ago

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

DylanNWatt · 1 year ago

👍 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.

sjswerdloff · 1 year ago
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

@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.

maschwenk · 1 year ago

Using --print mode 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 --allowedTools list. I've tried adding things like

As 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 why

but never works

filipesilva · 1 year ago

Also ran into this while trying to make a bin/fix-issue script. 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.

bcherny collaborator · 1 year ago

This is shipped in 0.2.60! Docs incoming.

maschwenk · 1 year ago

FWIW I've tried using this like:

 claude --verbose --print "Can you add the word zerb to the README.md" --json

And noticed that --verbose and --print mean 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.

filipesilva · 1 year ago

I second what @maschwenk said, was not expecting forced json either. Also would love streaming printing there, especially for testing these "scripts".

ashwin-ant collaborator · 1 year ago

Mind filing a separate issue for that request? I think it's worth tracking.

filipesilva · 1 year ago
github-actions[bot] · 1 year ago

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.