Skip to content

Conversation

@jmgilman
Copy link
Collaborator

@jmgilman jmgilman commented Jan 1, 2026

Summary

  • Add logs command to view session output without attaching
  • Add kill command to terminate sessions

logs command

View output from a session's log file without attaching to the session. Useful for checking on detached agents without interrupting them.

Usage: hjk logs <branch> <session> [flags]

Flags:

  • -f, --follow: Follow output in real-time (like tail -f)
  • -n, --lines <num>: Number of lines to show (default: 100)
  • --full: Show entire log from session start

Examples:

hjk logs feat/auth happy-panda      # View recent output
hjk logs feat/auth happy-panda -f   # Follow in real-time
hjk logs feat/auth happy-panda -n 500
hjk logs feat/auth happy-panda --full

kill command

Terminate a specific session and remove it from the catalog. The instance and other sessions are unaffected.

Usage: hjk kill <branch>/<session>

Examples:

hjk kill feat/auth/debug-shell
hjk kill main/claude-experiment

Test plan

  • Verify logs command shows session output
  • Verify logs -f follows new output in real-time
  • Verify logs -n 500 shows specified number of lines
  • Verify logs --full shows entire log
  • Verify kill terminates the session
  • Verify kill removes session from catalog
  • Verify error handling for non-existent sessions/instances

Closes JMG-14

🤖 Generated with Claude Code

Add two new commands for managing sessions:

- `logs <branch> <session>`: View session output without attaching
  - `-f, --follow`: Follow output in real-time (like tail -f)
  - `-n, --lines <num>`: Number of lines to show (default: 100)
  - `--full`: Show entire log from session start

- `kill <branch>/<session>`: Terminate a session
  - Kills the multiplexer session
  - Removes the session from the catalog

Closes JMG-14

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@linear
Copy link

linear bot commented Jan 1, 2026

Add fallback to default logs directory when config is nil to prevent
panic if config loading fails during initialization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jmgilman jmgilman merged commit 66178c3 into master Jan 1, 2026
1 check passed
@jmgilman jmgilman deleted the joshuagilman/jmg-14-commands-logs-and-kill-new branch January 1, 2026 04:15
jmgilman added a commit that referenced this pull request Jan 3, 2026
Current behavior:
N/A - new feature

New behavior:
Two new commands are available for managing sessions. The logs command allows viewing session output without attaching, with options for following real-time output, specifying line count, or showing full logs. The kill command terminates multiplexer sessions and removes them from the catalog using branch/session format.

Closes: #17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants