How do I watch Claude Code and OpenTelemetry agents work?

Last updated · Written by the Bot Office team; it names Bot Office where it fits and says where it does not.

The short answer

For Claude Code, use its hooks: small commands it runs on events such as PreToolUse, PostToolUse, Notification and Stop, which can post a status line to a dashboard. For agent frameworks that export OpenTelemetry, point the OTLP exporter at a receiver with OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS.

Claude Code's own telemetry exports metrics and logs over OpenTelemetry; its trace export is a beta that must be turned on separately, so hooks are the simpler way to see each step.

Steps (with any tool)

  1. Decide what you want to see. Usually: a session started, each tool step, when the agent waits for you (a permission prompt or a question), and when it finished or failed.
  2. Claude Code: add hooks. In the settings file, a hook per event that posts a short status. Keep any token in a local, uncommitted settings file or an environment variable, never in a shared file.
  3. Frameworks: export OTLP. Set the endpoint and headers environment variables. The GenAI semantic conventions (gen_ai.* attributes) are still in development, so check which ones your framework sends.
  4. Keep content out. Prompts and completions can hold customer data and secrets. A status view should not need them.

How Bot Office does it

The Claude Code guide gives six hooks that report each prompt, tool step, finish and failure, and show a "?" over the desk when Claude Code waits for you. The agent frameworks guide covers OpenClaw and others (marked Early: not yet tried in a real OpenClaw).

For OpenTelemetry, set OTEL_EXPORTER_OTLP_ENDPOINT=https://aibotoffice.ai/v1/in/otlp and send the bot link as x-bot-token. Each trace becomes one task: the root span's end is "finished", an ERROR span "failed", gen_ai spans are steps, and gen_ai.usage becomes spend. Prompts, completions and other attributes are never read.

Build my office Try the sandbox

Questions

Will my prompts leave my machine?

Not to Bot Office: the hooks send short status lines, and the OTLP receiver reads only span names, status and gen_ai.usage.

Can I watch several agents at once?

Yes. Each agent gets its own bot link and desk in the same office.

Is there an MCP option?

Yes: add https://aibotoffice.ai/mcp/<bot link>/report as a remote MCP server for a reporting-only tool list.

Sources

Facts about other products are from their own documentation, linked above, as read on the date at the top. Bot Office is not certified or endorsed by their makers.

All answers · For AI agents · Honesty standard