Workspaces

Features

RTK token compression, OpenTelemetry observability, LSP code intelligence, and plugin hooks in workspace images.

Apart from RTK's codex instructions, everything on this page is consumed by the claude harness. A phase running on agent.provider: codex does not use it, on any image.

Both images carry the Claude Code plugins and native OTel export. The manifest scopes otel_native to claude deliberately, because codex OTel is unverified here. What the omni-agent image, and the default toolchain image built on it, do not carry is the LSP servers and the Rust toolchain, which their manifests omit on purpose rather than declaring something the image lacks. See Workspace Images.

RTK Token Compression

RTK intercepts Bash tool calls and compresses output from commands like ls, find, git log, and tree. This reduces the tokens Claude consumes reading command output.

How It Works

RTK is built from source at a pinned release tag (cargo install --locked) into the omni-agent image and initialized via rtk init -g in the container entrypoint, after the entrypoint writes ~/.claude/settings.json. For Claude it installs a hook that intercepts Bash tool calls and rewrites them to compressed equivalents.

The entrypoint also runs rtk init -g --codex, which writes instructions to ~/.codex/RTK.md instead of a hook. A codex phase never consults the Claude hook.

Measured Impact

Live A/B evaluation on an "explore repository" task:

MetricWithout RTKWith RTKSavings
Context tokens61,11728,66353%
Cost (USD)$0.13$0.0929%
Conversation turns12650%
Bash tool calls10550%

RTK reduces context consumption without changing agent behavior: the same tasks complete with fewer tokens.

OpenTelemetry Observability

Workspace images export standard OTel metrics via OTLP, providing real-time token and cost tracking.

Exported Metrics

MetricTypeDescription
claude_code.token.usageCounterToken count per turn (input, output, cacheRead, cacheCreation)
claude_code.cost.usageCounterCumulative cost in USD
claude_code.session.countCounterSession counter
claude_code.commit.countCounterGit commit counter

Exported Log Events

EventDescription
claude_code.api_requestPer-API-call cost, model, cache tokens, duration, speed mode
claude_code.api_errorAPI error with status code and retry count
claude_code.tool_resultTool execution completion (name, duration, success)
claude_code.user_promptUser prompt submitted (length only, no content by default)

Configuration

The image sets no OTel variables. The orchestrator injects them only when COLLECTOR_URL is configured:

# Injected by the orchestrator when COLLECTOR_URL is set
CLAUDE_CODE_ENABLE_TELEMETRY=1
OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:8080

If COLLECTOR_URL is not set, neither is injected and there is no OTel export.

Two-Channel Observability

Workspace observability uses two complementary channels. They capture different data, neither can fully replace the other:

Captured by Plugin Hooks onlyCaptured by OTel onlyCaptured by both
Subagent lifecyclePer-API-call cost + modelToken usage totals
Session end eventAPI errors (status code, retries)Cost totals
Context compactionCache token breakdownTool completion
Git branch / merge / pushActive time trackingUser prompts
Tool start eventsprompt.id correlation
Permission requests

See the Observability guide for the full event pipeline and how to verify both channels are flowing.

LSP Code Intelligence

The image bundles language servers for Claude Code's LSP plugins:

LanguageServerPlugin
Pythonpyrightpyright-lsp
TypeScripttypescript-language-servertypescript-lsp
Rustrust-analyzerrust-analyzer-lsp

LSP servers are lazy: they only start when Claude encounters files in the matching language. An agent working on a Python-only repo will not start rust-analyzer or typescript-language-server.

Pre-Bundled Plugins

Plugins are baked into /opt/agentic/plugins/ and loaded at runtime via --plugin-dir. Available plugins:

  • sdlc: Git operation hooks (commit metrics, branch tracking, push events)
  • workspace: Compaction tracking, subagent lifecycle events

Plugin hooks emit JSONL events to stderr, captured by the orchestrator's event collection pipeline.

On this page