Sharing Traces

Sharing from an Agent

Set up agent sharing once, then share traces directly from your agent conversation.

You can share traces without leaving your agent conversation. Install the sharing instructions once with traces setup, then ask the agent to share.

Set up agent sharing

Interactive setup

traces setup

Traces scans for installed agents and asks which ones to configure.

Non-interactive setup

traces setup --yes

Installs for all detected agents without prompts.

Set up specific agents

traces setup --agent claude-code
traces setup --agent claude-code --agent opencode --agent cursor

Global setup

traces setup --global

Installs into global config directories so the setup works across projects.

Supported agent IDs

claude-code, opencode, cursor, codex, gemini-cli, pi, cline, amp, copilot

For storage formats and detection details, see Supported Agents.

How sharing works in chat

After setup, say any of these inside your agent:

  • "share to traces"
  • "publish this trace"
  • "share this session"
  • "upload this to traces"

The agent runs:

traces share --cwd "$PWD" --agent <agent-id> --json

Then it posts the shared URL in the conversation.

Session matching behavior

Agents with session hooks

Claude Code and Cursor can pass active session context, so traces share can target the active session more reliably.

OpenCode plugin support

OpenCode setup installs a plugin that can pass session context to traces share.

Agents without session hooks

Codex, Gemini CLI, Pi, Cline, Amp, and Copilot generally rely on working-directory matching.

If multiple sessions match, discover first, then share by ID:

traces share --list --cwd . --agent <agent-id> --json
traces share --trace-id <selected-id> --json

Team workflow

For team visibility, share into an org namespace:

traces namespace use my-org

Then keep sharing as normal. Trace links can be dropped into PRs and team channels.

Verify and update setup

traces doctor
traces setup --yes

traces doctor checks setup health. Re-running traces setup refreshes managed files.

Troubleshooting

  • Agent does not recognize share phrase: run traces setup again
  • "No trace found": run traces share --list and share with --trace-id
  • Auth errors: run traces login and retry

On this page