Skip to content

fix(super-threads): show agent questions instead of raw ask_user JSON#35

Merged
clintberry merged 4 commits into
mainfrom
fix/ask-user-action-row-rendering
Jun 10, 2026
Merged

fix(super-threads): show agent questions instead of raw ask_user JSON#35
clintberry merged 4 commits into
mainfrom
fix/ask-user-action-row-rendering

Conversation

@clintberry

Copy link
Copy Markdown
Contributor

Summary

When the agent called its ask_user tool, the thread's action log and the task card's live line showed the literal tool call — Ask_user({"question":"What would you like to name the file…"}) — right above the interactive prompt. Those surfaces now read Asked — {question} with a question icon, and once answered, the row pairs the question with the user's answer in the task history.

The fix is two-layer because action rows are persisted and replayed via snapshots: the server now decodes ask_user tool events with the question text as the action arg (readable placeholder fallback — never the args JSON), and the frontend special-cases both new Ask rows and legacy persisted Ask_user rows (parsing the stored JSON defensively, never throwing), so pre-fix history renders clean too. While a question is open the row shows no spinner — the "needs your input" prompt is the waiting affordance, and an unanswered question no longer spins forever in a terminal task's history.

Closes the last display path of the no-raw-JSON guarantee from docs/brainstorms/2026-06-08-interactive-agent-questions-requirements.md (R9); plan: docs/plans/2026-06-10-001-fix-ask-user-action-row-rendering-plan.md.

Test plan

  • Go decoder cases: question extraction, kind/options stripped, JSON-ish question text passes through verbatim, missing/non-string question degrades to the placeholder, generic tools keep the compact-JSON fallback.
  • Vitest specs for the display helper: legacy JSON parse, truncated/garbled args, missing arg (synthesized rows), non-question tools untouched.
  • go test ./..., vitest run (80/80), tsc -b --noEmit, npm run lint all clean.

Post-Deploy Monitoring & Validation

Display-only change — no schema, API, or agent-runtime behavior touched.

  • Validate: in a live session, give deuce a task that makes it ask a question. The action row should read "Asked — {question}" while the prompt is up; answering should pair question and answer in the collapsed history. Open an older session containing pre-fix ask rows and confirm no raw Ask_user({...}) text renders.
  • Failure signal: any literal Ask_user({ text visible in a thread, or a blank "Asked —" row.
  • Mitigation: revert this PR — display-only, no data migration to unwind.
  • Window/owner: next few agent sessions; whoever deploys.

Compound Engineering
Claude Code

@clintberry clintberry merged commit 1b045e0 into main Jun 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant