Repository navigation
Description
Summary
OpenCode appears to have session/history/event data, but it does not clearly expose execution metadata for tool calls and subagent runs to the active agent.
This makes it hard for the agent to answer questions like:
- did the task stop in the middle?
- is it still running or just slow?
- when was the last successful activity?
- did it fail, timeout, or get cancelled?
Why this matters
Today the agent can usually see:
- tool results
- success/failure at a high level
- returned content
But it often cannot reliably see structured metadata such as:
- start time
- end time
- duration
- last activity time
- running/completed/timed_out/cancelled state per tool/subagent
That leads to vague answers where the platform may know more internally, but the agent cannot reason over it.
Proposal
Expose minimal execution metadata for:
- tool calls
- subagent/task runs
Suggested fields:
idkind(tool_call|subagent_run)namestatus(queued|running|succeeded|failed|cancelled|timed_out)started_atended_atduration_mslast_activity_atparent_iderror_summary
This does not need full raw tracing. A small structured timeline would already be enough for better agent reasoning.
Why agent-visible matters
A UI timeline would be useful, but agent-visible metadata is the more important gap.
If the agent can inspect execution metadata, it can:
- answer interruption questions precisely
- decide whether to retry or wait
- distinguish slow vs stuck
- explain failures more accurately
- summarize partial runs without guessing
Notes
This report is intentionally phrased as an exposure/observability gap, not a claim that OpenCode has no internal trace data.
From the public docs, I could verify:
- session/message/history APIs exist
- event streaming exists
- share sync includes conversation history and session metadata
- a session timeline concept exists in the UI/docs
What I could not find clearly documented was agent-accessible execution metadata for tool/subagent runs.
Activity
github-actions commentedon Apr 19, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:(e.g.[FEATURE]: Expose tool/subagent execution metadata to the agent)Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
tool_call_updatein-progress notifications don't include tool metadata — very similar: about exposing execution metadata for tool calls (including subagent sessionId) to clients during executionmetadata.sessionIdafter interruption — related: agent-visible metadata gap for subagent runsIf you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Apr 19, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.
jjangga0214 commentedon Apr 20, 2026
Reopened as #23474 using the required feature request format and title prefix.