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 setupTraces scans for installed agents and asks which ones to configure.
Non-interactive setup
traces setup --yesInstalls for all detected agents without prompts.
Set up specific agents
traces setup --agent claude-code
traces setup --agent claude-code --agent opencode --agent cursorGlobal setup
traces setup --globalInstalls 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> --jsonThen 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> --jsonTeam workflow
For team visibility, share into an org namespace:
traces namespace use my-orgThen keep sharing as normal. Trace links can be dropped into PRs and team channels.
Verify and update setup
traces doctor
traces setup --yestraces doctor checks setup health. Re-running traces setup refreshes managed files.
Troubleshooting
- Agent does not recognize share phrase: run
traces setupagain - "No trace found": run
traces share --listand share with--trace-id - Auth errors: run
traces loginand retry