- Change verbose emoji messages to minimal format
- Print '> session <id> ...' first, then status after operation completes
- 'merged' shown in bold green
- 'discarded' shown in bold yellow
New commands:
- studio cli (alias: c) - Start a new interactive g3 session in an isolated worktree
- studio resume <id> (alias: r) - Resume a paused interactive session
- Bare 'studio' now defaults to 'studio cli'
Session changes:
- Added SessionStatus::Paused for sessions that can be resumed
- Added SessionType enum (OneShot, Interactive) for future use
- Interactive sessions use inherited stdio for direct TTY access
- Sessions are marked as Paused when user exits g3
Workflow:
1. studio # creates worktree, runs g3 interactively
2. (work in g3, exit when done)
3. studio resume <id> # continue working
4. studio accept <id> # merge to main when finished
When --accept was passed after positional args (e.g., 'studio run --agent
carmack task --accept'), clap's trailing_var_arg captured it as part of
g3_args instead of parsing it as the studio flag. This caused g3 to error
with 'unexpected argument --accept'.
- Extract filter_accept_flag() helper to detect and remove --accept from
trailing args
- Set auto_accept=true if --accept found in either position
- Add 5 unit tests for the filtering logic
Automatically accept the session after g3 completes successfully,
but only if there are commits on the branch.
Changes:
- Add --accept flag to Run command (stripped, not passed to g3)
- Add has_commits_on_branch() helper using git rev-list --count
- Auto-accept triggers merge to main and cleanup when:
1. g3 exits successfully (exit code 0)
2. Branch has commits ahead of main
- Show warning if --accept set but no commits exist
Usage: studio run --agent carmack --accept
Studio can now run g3 without specifying an agent:
# Agent mode (existing)
studio run --agent carmack "fix the bug"
# One-shot mode (new)
studio run "fix the bug"
When no agent is specified, sessions are created under the 'single'
directory in .worktrees/sessions/single/<session-id>/
This makes Studio a complete replacement for Flock mode.
Standardize project name to lowercase 'g3' throughout documentation,
comments, and configuration files. Environment variables (G3_*) are
unchanged as they follow the uppercase convention.
Changes:
- Fix JSON path for session logs: now reads from context_window.conversation_history
(with fallback to messages for backwards compatibility)
- Remove 500-character truncation to show full summary
- Add termimad dependency for terminal markdown rendering
- Display summary with proper markdown formatting (headers, bold, code, lists)
The extract_session_summary() function was looking for messages at the wrong
JSON path. Session logs store conversation history at context_window.conversation_history,
not at the top-level messages key.
Studio enables running multiple g3 agents concurrently without conflicts
by using git worktrees for isolation.
Features:
- studio run --agent <name> [args...]: Create worktree, spawn g3, tail output
- studio list: Show all active sessions
- studio status <id>: Show session details and summary
- studio accept <id>: Merge session branch to main and cleanup
- studio discard <id>: Delete session without merging
Each session gets:
- Isolated worktree at .worktrees/sessions/<agent>/<session-id>
- Dedicated branch: sessions/<agent>/<session-id>
- Short UUID (8 chars) for easy reference
- Automatic --workspace and --agent flags passed to g3