Skip to content

--tui silently ignores --output/--format and has no "export to path" action #220

Description

@samestep

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)

  1. Add a TUI "export to path" action (prompt for a destination + format, or honor --output/--format passed on launch as the default export target).
  2. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions