{"id":45094070,"url":"https://github.com/diskd-ai/ccbox","last_synced_at":"2026-02-26T00:01:27.769Z","repository":{"id":339355023,"uuid":"1161564916","full_name":"diskd-ai/ccbox","owner":"diskd-ai","description":"ccbox: Rust TUI to manage Codex/Claude agent sessions","archived":false,"fork":false,"pushed_at":"2026-02-21T16:01:23.000Z","size":17018,"stargazers_count":28,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-25T01:00:42.126Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diskd-ai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-19T08:59:28.000Z","updated_at":"2026-02-24T21:05:09.000Z","dependencies_parsed_at":"2026-02-21T20:01:27.412Z","dependency_job_id":null,"html_url":"https://github.com/diskd-ai/ccbox","commit_stats":null,"previous_names":["diskd-ai/ccbox"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/diskd-ai/ccbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskd-ai%2Fccbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskd-ai%2Fccbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskd-ai%2Fccbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskd-ai%2Fccbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diskd-ai","download_url":"https://codeload.github.com/diskd-ai/ccbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskd-ai%2Fccbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29845140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"ssl_error","status_checked_at":"2026-02-25T22:37:25.960Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-19T18:08:27.097Z","updated_at":"2026-02-26T00:01:27.701Z","avatar_url":"https://github.com/diskd-ai.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ccbox\n\nTUI “box” for managing coding-agent sessions (Codex, Claude, Gemini, OpenCode): browse local session logs now, and later reconstruct exactly what the agent did (files, tools, tokens).\n\n## Table of contents\n\n- [Features](#features)\n- [Key features (what it’s for)](#key-features-what-its-for)\n  - [Skill spans (and loop detection)](#skill-spans-and-loop-detection)\n  - [Timeline analysis (TUI + CLI)](#timeline-analysis-tui--cli)\n  - [Fork/resume sessions (Codex)](#forkresume-sessions-codex)\n  - [ccbox-insights skill (code-insights)](#ccbox-insights-skill-code-insights)\n- [Install](#install)\n- [Screenshots](#screenshots)\n  - [Projects](#projects)\n  - [Menu bar](#menu-bar)\n  - [Session Detail (timeline)](#session-detail-timeline)\n  - [Session actions (fork/resume)](#session-actions-forkresume)\n  - [Session stats](#session-stats)\n  - [Tasks](#tasks)\n  - [Processes](#processes)\n- [Roadmap](#roadmap)\n- [Run](#run)\n- [Skill (skills.sh)](#skill-skillssh)\n- [Keybindings (prototype)](#keybindings-prototype)\n- [License](#license)\n\n## Features\n\n- Full-screen **Projects** → **Sessions** → **Session Detail** timeline\n- Multi-engine support (Codex, Claude, Gemini, OpenCode) with TUI + CLI filters\n- Type-to-filter + highlight, multi-select, and batch delete (with confirmation)\n- “Online” dot (`●`) for recently modified projects/sessions\n- Skill span tracing (colored gutter + loop detection) and a Skills overlay (`S`)\n- Fork/resume Codex from a selected timeline item (`f`)\n- Statistics windows for projects/sessions (`F3`)\n- Tasks screen + editor (including clipboard image paste)\n- New Session prompt editor (`n`) that spawns agents in `Pipes` or `TTY` mode\n- Processes screen (`P`) for stdout/stderr/log viewing + killing spawned agents; attach/detach TTY (`a`, `Ctrl-]`)\n- Auto-rescans when session sources change (file watcher for Codex/Claude/Gemini/OpenCode)\n- Update notifications and self-update (`ccbox update`)\n\n## Key features (what it’s for)\n\n### Skill spans (and loop detection)\n\nWhen an agent session activates a skill (for example a commit helper, design-doc generator, or an install workflow), `ccbox` detects the skill boundaries and overlays that context on the timeline:\n- **Visual overlay (TUI):** colored gutter markers show which timeline items happened “inside” which skill span; nested skills get their own span depth.\n- **Loop detection:** repeated consecutive invocations of the same top-level skill are flagged so you can spot “skill recursion” quickly.\n- **CLI export:** `ccbox skills` prints a per-skill summary (or `--json`) so other automation can reason over skill usage.\n\nUse cases:\n- “Why did this session burn tokens?”: see which skill dominated time/tool calls.\n- “Which skill caused the failures?”: attribute tool failures to the active skill context.\n- “Is a skill looping?”: catch repeated skill invocations early and adjust instructions/skills.\n\nHow to use:\n- TUI: open a session → press `S` for the Skills overlay.\n- CLI: `ccbox skills [log|project] [session-id] --json` (use `--id` if you prefer flags).\n\n### Timeline analysis (TUI + CLI)\n\nThe Session Detail timeline is the evidence trail of what happened: user requests, assistant output, tool calls, tool outputs, and token/stat markers (when available).\n\nUse cases:\n- Root-cause a failed run by replaying tool calls and their outputs.\n- Write a precise “what happened” report for teammates or incident notes.\n- Confirm what was actually executed (commands, files touched) without guessing.\n\nHow to use:\n- TUI: open a session → `Tab` changes focus between timeline/details → `Enter` jumps Tool → ToolOut.\n- CLI: `ccbox history [log|project] [session-id] --full` for a complete, copy/paste-friendly timeline.\n\n### Fork/resume sessions (Codex)\n\nFor Codex sessions, `ccbox` can fork/resume from a selected point in the timeline to create a new run with the same context up to that moment.\n\nUse cases:\n- “Try a different fix” from the same starting point without re-reading the whole session.\n- Continue after a bad turn or failed tool call with a clean branch.\n- Break a long session into smaller, more focused follow-up runs.\n\nHow to use:\n- TUI: open a Codex session → select a Turn/User/Out/ToolOut item → press `f` (or use the Session menu).\n\n### ccbox-insights skill (code-insights)\n\n`ccbox-insights` is an installable agent skill that reads session history via `ccbox` (including optional skill-span context) and produces:\n- A “lessons learned” memo backed by evidence\n- A list of recurring failure patterns (invalid tool use vs runtime failures)\n- Copy-ready, additive instruction snippets for project `AGENTS.md` (and optional global rules)\n\nUse cases:\n- After a week of work, turn noisy session logs into better standing instructions.\n- Reduce repeated tool-call errors and avoid “clarify/correct” churn.\n- Save time and tokens by standardizing the workflows that actually worked.\n\nHow to use:\n- Install: `npx skills add diskd-ai/ccbox --skill ccbox-insights --global --yes`\n- Prompt: “Use the ccbox-insights skill to analyze the latest N sessions for this project and propose AGENTS.md additions.”\n\n## Install\n\nQuick install from GitHub Releases (macOS/Linux):\n```sh\ncurl -fsSL -H 'Cache-Control: no-cache' -o - https://raw.githubusercontent.com/diskd-ai/ccbox/main/scripts/install.sh | /bin/bash\n```\n\nHomebrew (recommended):\n```sh\nbrew tap diskd-ai/ccbox\nbrew install ccbox\n```\n\nDeveloper build (from source): see `AGENTS.md`.\n\n## Screenshots\n\n### Projects\n\n![Projects screen showing the menu bar, searchable projects list, and session-count/last-modified columns.](assets/projects.png)\n\nWhat’s happening / features:\n- Browse projects discovered from your local Codex/Claude/Gemini session logs and OpenCode sessions.\n- Type to filter (matching text is highlighted); `Esc` clears.\n- Shift+Arrows multi-select; `Del` deletes selected (with confirmation).\n- Project table includes path, session count, and last modified time; `●` indicates a recently modified (“online”) project.\n\n### Menu bar\n\n![Menu bar with the Window menu open, showing available screens and shortcuts.](assets/menu-window.png)\n\nWhat’s happening / features:\n- `F2` opens the menu; arrows/Enter (and mouse) navigate.\n- The Engine menu (Projects/Sessions) filters by agent engine: All/Codex/Claude/Gemini/OpenCode.\n- The Window menu provides shortcuts to every screen.\n\n### Session Detail (timeline)\n\n![Session Detail screen showing the timeline (left) and details (right) with focus styling and scrollbars.](assets/timeline.png)\n\nWhat’s happening / features:\n- Timeline shows session events in order; details are always expanded.\n- `Tab` switches focus (focused pane uses a double border); scrollbars indicate overflow.\n- `Enter` jumps Tool → ToolOut; `o` previews the last Out; `F3` opens statistics.\n\n### Session actions (fork/resume)\n\n![Session menu showing actions like fork/resume, focus switching, result preview, and visible context.](assets/session-menu.png)\n\nWhat’s happening / features:\n- Fork/resume Codex from a selected Turn/User/Out/ToolOut record.\n- Toggle Visible Context for the current turn.\n\n### Session stats\n\n![Session statistics window with duration, tokens, tool usage, and change summary.](assets/session-stats.png)\n\nWhat’s happening / features:\n- Time spent, token usage, tool-call breakdown (success/error/unknown), and `apply_patch` changes.\n\n### Tasks\n\n![Tasks screen showing tasks list with engine, project path, and image counts.](assets/tasks.png)\n\nWhat’s happening / features:\n- Type to filter; `n` creates; `Ctrl+Enter` spawns; Shift+Tab switches engine.\n\n### Processes\n\n![Processes screen showing spawned background agents with status and quick access to outputs.](assets/processes.png)\n\nWhat’s happening / features:\n- View output (`s`/`e`/`l`), kill (`k`), attach (`a`), and open the related session.\n\n## Roadmap\n\nSee `ROADMAP.md`.\n\n## Run\n\n```bash\nccbox\n```\n\nCLI mode (no TUI):\n\n```bash\nccbox projects\nccbox sessions                     # defaults to current folder (or a parent folder) project\nccbox sessions \"/path/to/project\"\nccbox history                      # defaults to latest session in current folder project\nccbox history \"/path/to/session.jsonl\"\nccbox history \"/path/to/session.jsonl\" --full\nccbox skills                       # defaults to latest session in current folder project\nccbox skills \"/path/to/project\"    # latest session in that project\nccbox skills \"/path/to/project\" \"SESSION_ID\"\nccbox skills --id \"SESSION_ID\" --json\nccbox sessions --limit 50 --offset 0 --size\nccbox history --limit 200 --offset 0 --full --size\nccbox update\n```\n\nCLI details:\n- Auto-selects the project for the current folder (or nearest parent) when `project-path` is omitted.\n- Pagination: `sessions` and `history` default to `--limit 10`; use `--limit N` and `--offset N`.\n- `projects` output: `project_name\u003cTAB\u003eproject_path\u003cTAB\u003esession_count`\n- `sessions` output: `started_at_rfc3339\u003cTAB\u003esession_id\u003cTAB\u003etitle\u003cTAB\u003elog_path` (newest-first; `--size` adds `file_size_bytes` before `log_path`)\n- `history` accepts a session `.jsonl` path or a **project directory**; if a directory is provided it selects that project’s latest session.\n- `history` prints a readable timeline; `--full` includes long details (tool calls/outputs, full messages); `--size` prints stats to stderr.\n- `skills` accepts a session `.jsonl` path or a **project directory**, plus an optional `session-id` (positional or `--id`); `--json` prints structured spans/loops.\n- Pipe-friendly output (handles broken pipes like `ccbox history | head`).\n- Parse warnings and “truncated” notices are printed to stderr.\n- On TUI start, `ccbox` checks for a newer GitHub Release in the background and shows a hint if one is available.\n\nOptional overrides:\n- `CODEX_SESSIONS_DIR` (defaults to `~/.codex/sessions`; Windows: `%USERPROFILE%\\\\.codex\\\\sessions`)\n- `CLAUDE_PROJECTS_DIR` (defaults to `~/.claude/projects`)\n- `CCBOX_GEMINI_DIR` (defaults to `~/.gemini`; sessions are discovered from `tmp/\u003cproject-hash\u003e/chats/session-*.json`)\n- `CCBOX_OPENCODE_DB_PATH` (defaults to `XDG_DATA_HOME/opencode/opencode.db`, else `~/.local/share/opencode/opencode.db`)\n\nNotes:\n- Spawning sessions requires `codex` on your `$PATH` (and `claude` if you switch engines).\n\n## Skill (skills.sh)\n\nThis repo ships agent skills:\n\n- `ccbox`: inspect local session logs using the `ccbox` CLI (`projects`, `sessions`, `history`)\n- `ccbox-insights`: analyze tool-call failures in session logs and propose additive instructions (project `AGENTS.md` + global)\n\nInstall the code-insights skill (`ccbox-insights`):\n\n```bash\nnpx skills add diskd-ai/ccbox --skill ccbox-insights --global --yes\n```\n\nAnalyzes unsuccessful tool calls and suggests additive fixes in `AGENTS.md` (project-level).\n\nHelps save time and tokens.\n\nInstall one or both:\n\n```bash\nnpx skills add diskd-ai/ccbox --skill ccbox --global --yes\nnpx skills add diskd-ai/ccbox --skill ccbox-insights --global --yes\n```\n\nNo additional setup is required after `npx skills add ... --global`.\n\nRequirements: `ccbox` on your `$PATH` and access to your sessions directory (`CODEX_SESSIONS_DIR` if needed).\n\nExample prompts:\n\n- Codex: `codex \"Use the ccbox skill to summarize the latest session for this repo.\"`\n- Claude: `claude \"Use the ccbox skill to summarize the latest session for this repo.\"`\n- Gemini: `gemini \"Use the ccbox skill to summarize the latest session for this repo.\"`\n- Insights (project): `Use the ccbox-insights skill to analyze tool-call failures in the latest 20 sessions for \"/path/to/project\".`\n- Insights (global for codex): `Use the ccbox-insights skill to analyze **codex** tool-call failures across my top 5 projects (by session count) and propose global instruction updates.`\n\n## Keybindings (prototype)\n\n- Global: `Ctrl+R` rescan · `F2` system menu · `P` processes · `F1`/`?` help · `Ctrl+Q`/`Ctrl+C` quit\n- Mouse: wheel scrolls lists/outputs/details · left click selects/focuses\n- Lists: arrow keys move selection · `PgUp`/`PgDn` page\n- Projects: type to filter · `Esc` clears filter · `Enter` opens · `Space` result (newest session) · `Del` delete (confirm)\n- Sessions: `Enter` opens · `Space` result (last Out) · `n` new session · `Del`/`Backspace` delete (confirm) · `Esc` back\n- New Session: edit/paste · `Ctrl+Enter`/`Cmd+Enter` send · `Shift+Tab` switch engine · `F4` switch `Pipes`/`TTY` · `Esc` cancel\n- Session Detail: `Enter` ToolOut (Tool call) · `f` fork/resume (Codex) · `o` result (last Out) · `c` visible context window · `Esc`/`Backspace` back\n- Processes: `a` attach (TTY) · `Ctrl-]` detach · `s` stdout · `e` stderr · `l` log · `k` kill · `Enter` opens session (Codex only)\n\n## License\n\nMIT. See `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiskd-ai%2Fccbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiskd-ai%2Fccbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiskd-ai%2Fccbox/lists"}