Skip to content

chat: the agent's offer to resume a fixed run is answered in the chat - #73

Merged
endrix merged 1 commit into
mainfrom
feat/resume-from-chat
Oct 2, 2026
Merged

endrix merged 1 commit into
mainfrom
feat/resume-from-chat

Conversation

@endrix

@endrix endrix commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Follow-up to #72: the user wanted to resume from the chat itself, not from a notification.

  • resume_failed_run now asks through a new platform hook, DiagramRunHost.confirmInChat. It puts a Resume / Not now card into the chat session that made the fix. The VS Code notification is kept only as the fallback when no chat panel is reachable on the diagram.
  • Plumbing:
    • setChatConfirmHandler connects the hook to ChatRuntime.confirmInChat.
    • The runtime posts chat.confirm and resolves on the panel's chat.confirmAnswer. A pending confirmation is declined if the runtime is disposed.
    • The hook is only offered for profiles with a chat.
  • Panel: a new confirm timeline item, styled like the permission cards. When it arrives, the panel switches back to the session if a run agent's view was showing.
  • The fix prompt and the tool's description tell the agent that the tool asks in the chat, so the user isn't asked twice.

Tests:

  • chat-runtime-confirm.test.ts: post, answer, decline, no panel.
  • chat-panel-confirm.test.ts: the card, switching to the session, answering once.
  • resume-failed-run.test.ts: asked in the chat, declined in the chat, the notification fallback.

https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU

`resume_failed_run` no longer pops a VS Code notification: the run driver
asks through the host's new `confirmInChat`, which puts a card in the chat
session the fix was made in, with Resume / Not now buttons. The notification
remains the fallback when no chat panel can be reached on the diagram.

Platform: `DiagramRunHost.confirmInChat` (profiles with a chat), wired via
`setChatConfirmHandler` to `ChatRuntime.confirmInChat`, which posts
`chat.confirm` and resolves on the panel's `chat.confirmAnswer` (declined if
the runtime is disposed first). The panel shows the card in the session's
timeline, switching back to the session if a run agent's view was shown.

The fix prompt and the tool's description tell the agent the tool asks in
the chat itself, so it does not ask the user a second time.

Claude-Session: https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU
@endrix
endrix merged commit 47224fc into main Oct 2, 2026
1 check passed
@endrix
endrix deleted the feat/resume-from-chat branch October 2, 2026 14:49
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