thirdeye Integration

Tag Claude Code and Codex traces by workbench plan, wave, task, agent role, and pipeline step.

thirdeye records Claude Code and Codex sessions locally. Workbench adds structured WB_* environment variables to every agent it launches; thirdeye can turn those values into tags automatically. The result is a trace inventory you can filter by plan, wave, task, role, or exact pipeline step.

Set up automatic tags

Install thirdeye and register hooks for each supported harness that workbench will dispatch:

brew install duncanmckinnon/tap/thirdeye
thirdeye add --claude
thirdeye add --codex

Tell thirdeye to capture workbench metadata, then start workbench from the same shell:

export THIRDEYE_CAPTURE_ENV='WB_*'
wb run my-plan

Add the export to your shell profile if you want it enabled permanently. Workbench's --trace and --trace-env switches are on by default, so no workbench flag is required. --trace-prompt is unrelated to tag capture and can remain off.

thirdeye currently captures workbench invocations that use Claude Code or Codex. Workbench can dispatch other harnesses, but those sessions will not appear in thirdeye unless thirdeye adds support for that harness.

Tags emitted for every invocation

thirdeye lowercases each captured value and prefixes it with the WB_ field name:

Workbench variableExample valuethirdeye tagMeaning
WB_PLANauth-refactorplan-auth-refactorPlan folder slug under .workbench/.
WB_WAVE2wave-2Wave containing the task.
WB_TASKtask-3task-task-3Task id. The repeated task- is expected: field prefix plus value.
WB_AGENTtesteragent-testerWorkbench role for this invocation.
WB_STEPtest#1step-test#1Exact pipeline stage and attempt.

Task-pipeline sessions normally receive all five tags. Standalone stages such as planning, final review, and PR writing do not have a wave or task, so they receive only the metadata that applies.

Tags are attached automatically to the session-start event. Spaces and unsupported punctuation become dashes; valid _, ., -, and # characters are preserved. Invalid or longer-than-64-character tags are skipped.

Pipeline step tags

Use agent-* to select a role across attempts, or step-* to select one exact stage:

Workbench stageAgent tagStep tag
Plan authoring with wb planagent-plannerstep-plan
Implementationagent-implementorstep-implement
TDD: write failing testsagent-testerstep-tdd-test
TDD: implement until tests passagent-implementorstep-tdd-implement
Test attempt Nagent-testerstep-test#N
Fix after test attempt Nagent-fixerstep-test-fix#N
Task review attempt Nagent-reviewerstep-review#N
Fix after task review Nagent-fixerstep-review-fix#N
Merge-conflict resolutionagent-mergerstep-merge
Final-review requirements summaryagent-summarizerstep-requirements
Final branch review attempt Nagent-branch_reviewerstep-review#N
Final branch-review fix Nagent-fixerstep-fix#N
PR body generationagent-pr_writerstep-pr

Task reviews and final branch reviews both use step-review#N. Combine the step with agent-reviewer or agent-branch_reviewer to distinguish them.

Because # begins a comment in many shells, quote step tags that contain it.

Query workbench traces

--tag is repeatable and filters with AND semantics. Start broad with a plan, then add dimensions:

# Every captured session for one plan.
thirdeye list --tag plan-auth-refactor --tree
 
# One task in that plan.
thirdeye list \
  --tag plan-auth-refactor \
  --tag task-task-3 \
  --tree
 
# First test attempt for every task in wave 2.
thirdeye list \
  --tag plan-auth-refactor \
  --tag wave-2 \
  --tag 'step-test#1' \
  --tree
 
# Task-review sessions, excluding final branch review.
thirdeye list \
  --tag plan-auth-refactor \
  --tag agent-reviewer \
  --tree
 
# Final branch-review retries only.
thirdeye list \
  --tag plan-auth-refactor \
  --tag agent-branch_reviewer \
  --tag 'step-review#2' \
  --tree

Run thirdeye tags to see the global tag inventory. In thirdeye ui, the same tags appear in the session filter, where you can combine them without typing commands.

Configure tracing per plan

Tracing metadata is enabled by default. You can make that explicit in plan frontmatter or disable it for a sensitive run:

---
trace: true
trace_env: true
---
wb run my-plan --no-trace-env
# or disable both env and prompt metadata:
wb run my-plan --no-trace

For a custom adapter in .workbench/agents.yaml, set inject_env: true; custom adapters default to not receiving environment metadata. Built-in adapters already inject it.

Troubleshooting

  • Sessions appear without workbench tags. Confirm THIRDEYE_CAPTURE_ENV='WB_*' is exported in the shell that launches wb, and that neither --no-trace nor --no-trace-env is active.
  • No sessions appear. Run thirdeye add --claude or thirdeye add --codex for the harness used by that workbench role, then start a new run.
  • Only some roles appear. Check the effective workbench profile. thirdeye captures Claude Code and Codex; roles assigned to other harnesses will not be recorded.
  • A custom adapter has no tags. Set inject_env: true for that adapter.
  • A step query returns both task and final reviews. Add agent-reviewer for task review or agent-branch_reviewer for final review.