Skip to content

Leaf harness transcripts are never captured in Tangle boxes: opencode writes opencode.db under the sidecar's private runtime home, not $HOME/.local/share/opencode/storage #1360

Description

@drewstone

Measured

Over the Discovery fleet records of 2026-09-23/24 (268 runs, agent-runtime 0.249.1 to 0.261.0), 437 settled leaf children carried harnessTranscript: { status: 'unavailable', reason: 'no-transcript' }, and one carried available.
The capture ran, and found no files.

A read-only probe of two live axes-screen children (2026-09-24 09:02Z, boxes sandbox-7103be8ce232 and sandbox-e546815f03fe) showed why:

  • The box user is agent with HOME=/home/agent.
  • The running harness is opencode run --format json --session ses_… with HOME=/home/agent/.sidecar/cli-runtime-homes/opencode/<sha256> and XDG_DATA_HOME=<that>/.local/share.
  • The session store is <runtime home>/.local/share/opencode/opencode.db (SQLite, 6.2 MB plus a 4.2 MB WAL after 45 minutes), beside log/opencode.log. There is no storage/ directory.
  • /home/agent/.sidecar, …/cli-runtime-homes and …/cli-runtime-homes/opencode are root 711: traversable, not listable. The runtime home itself is agent 755.

captureHarnessTranscript (src/runtime/harness-transcript.ts) runs find "$HOME/.local/share/opencode/storage" "$HOME/.local/share/opencode/log" with the exec user's $HOME, so it lists nothing and reports no-transcript.
Even with the right directory, the store is one binary SQLite file above MAX_FILE_BYTES (2 MiB), and environment.read returns a string.

The sidecar derives the runtime home as sha256(provider \0 backendIdentity) (agent-dev-container apps/sidecar/src/backends/cli-auth.ts, resolveCliRuntimeHome), so Runtime cannot compute it.

Consequence

No leaf child in the fleet has a native harness session on record.
The native session is the only record of what opencode's own task subagents did (#1264): 34 child-level task calls in these runs are visible as calls in the provider events, and their contents are not retained anywhere.

What would close it

  1. agent-dev-container (sidecar): expose the harness session for a sandbox session id, either as a session export (opencode export <sessionID>, JSON) or as the runtime-home path the sidecar used, through the box API the Tangle provider already calls.
  2. agent-sdk (agent-provider-tangle): surface it on the environment, for example as an optional transcript(sessionId).
  3. agent-runtime: prefer that port in captureHarnessTranscript; keep the file enumeration for harnesses that write under $HOME. The session id is already in the provider events (session.updated.sessionId).

The done check: a settled leaf child in a Tangle box records available, and agent-eval's opencode reader opens the artifact.

Related: #1214 (capture before destroy), #1264 (harness subagents), agent-runtime#1359 (nested managers forward the receipt), agent-eval#797 (the integrity report counts native-session-unavailable by reason).
Coverage report: tangle-network/discovery-lab reports/fleet-observability/coverage.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions