Summary
In TUI mode, --output and --format are silently ignored — there is no warning and no effect. The TUI's only Markdown actions are m "Open Markdown" and v "View Markdown", neither of which can write to a path I choose: _ensure_session_file() always writes to a hardcoded session-{id}.md inside the project's ~/.claude/projects/<encoded>/ directory (tui.py:1827), then opens it in a browser / embedded pager.
The net effect is that the TUI is usable only for discovery (find the session ID by eye), after which I have to copy-paste that ID into a separate non-interactive command to actually produce a file where I want it. That's the first step in a multi-step dance I had to write down for myself.
Repro
claude-code-log --tui --format=markdown --output log.md
log.md is never created.
--format/--output have no effect and emit no warning (contrast with --expand-paths/--filter-path, which do warn when ignored — see cli.py:813-831).
Cause
The TUI branch in cli.py (lines 849-956) only consumes input_path/projects_dir; output_format and output are never threaded into run_session_browser.
Suggested fix (either or both)
- Add a TUI "export to path" action (prompt for a destination + format, or honor
--output/--format passed on launch as the default export target).
- At minimum, warn (like the other ignored-flag cases) that
--output/--format are no-ops under --tui, and/or print the selected session ID on exit so it can be captured for a follow-up command.
Investigation and write-up by Claude (Claude Code).
Summary
In TUI mode,
--outputand--formatare silently ignored — there is no warning and no effect. The TUI's only Markdown actions arem"Open Markdown" andv"View Markdown", neither of which can write to a path I choose:_ensure_session_file()always writes to a hardcodedsession-{id}.mdinside the project's~/.claude/projects/<encoded>/directory (tui.py:1827), then opens it in a browser / embedded pager.The net effect is that the TUI is usable only for discovery (find the session ID by eye), after which I have to copy-paste that ID into a separate non-interactive command to actually produce a file where I want it. That's the first step in a multi-step dance I had to write down for myself.
Repro
log.mdis never created.--format/--outputhave no effect and emit no warning (contrast with--expand-paths/--filter-path, which do warn when ignored — seecli.py:813-831).Cause
The TUI branch in
cli.py(lines 849-956) only consumesinput_path/projects_dir;output_formatandoutputare never threaded intorun_session_browser.Suggested fix (either or both)
--output/--formatpassed on launch as the default export target).--output/--formatare no-ops under--tui, and/or print the selected session ID on exit so it can be captured for a follow-up command.Investigation and write-up by Claude (Claude Code).