anomalyco / anomalyco/opencode
[FEATURE]: Render task-style transcript rows for child sessions, not only task tool parts
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Task-style transcript rows — the per-child row with nested tool calls, live status, the subagent viewer, and the "view subagents" hint — are gated on the message containing a tool part named task whose state metadata carries the child session id. Only the built-in task tool writes that shape, so child sessions created any other way get no transcript row at all, even though child navigation (ctrl+x down) already reaches them because it keys off session records' parentID, not tool parts.
Verified against current main (3dd1b30):
packages/opencode/src/tool/task.ts(~183): the task tool writesmetadata: { parentSessionId, sessionId, model, background? }viactx.metadata— the only writer of task-shaped parts.packages/tui/src/routes/session/index.tsx:toolDisplay()maps a hardcoded tool-name set including"task"(~2635) to theTaskcomponent (~1765);Taskreadsmetadata.sessionId(~2222) and syncs the child's messages to render nested tool calls; the "view subagents" hint row requires ataskpart in the message (~1509).- The same route already computes
childrenfrom session records'parentID(~206) — the data for generic rendering is already in hand. - Plugins cannot approximate this themselves:
TuiHostSlotMaphas no transcript/message slot (packages/plugin/src/tui.ts, ~455), the server API has no endpoint to write message parts, and prompt-inputagent/subtaskparts don't render (PART_MAPPINGcovers onlytext/tool/reasoning, ~1578).
Proposal: render a task-style row per child session of the current session — the children list the route already builds — with title from the session row, live state from session_status[childID], and the same enterChild navigation the Task row uses. Anchor the group under the latest assistant message, the same place the existing hint row sits. Keep task-part rows exactly as they are.
Motivation from the real world: ultraopen, a workflow-orchestration plugin, spawns child sessions via client.session.create({ parentID, ... }) and prompts them. Users can navigate into each child, but the transcript shows nothing about them — one workflow tool call, then silence — while a task-tool fan-out in the same UI shows a row per child.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/tui/src/routes/session/index.tsx, reading the existing children list, Task component, toolDisplay(), and enterChild navigation; inspect packages/opencode/src/tool/task.ts to compare the current task-part metadata. Render child-session rows under the latest assistant message with the child title and session_status state, while preserving existing task-part rows and navigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100