Skip to content

docs(sessions): map the current Stop and ownership paths - #6498

Open
mmabrouk wants to merge 1 commit into
agent/session-execution-rfcfrom
spike/session-stop-map
Open

docs(sessions): map the current Stop and ownership paths#6498
mmabrouk wants to merge 1 commit into
agent/session-execution-rfcfrom
spike/session-stop-map

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Sep 2, 2026

Copy link
Copy Markdown
Member

Stop currently shares one endpoint and Redis state with attach, cancellation, kill, and approval interruption. This makes behavior difficult to reason about.

This document traces the current browser, API, Redis, heartbeat, runner, harness, sandbox, records, and interaction paths. It includes sequence diagrams, key ownership, time-to-live values, and contradictions between the RFC and current code.

Issue coverage

Research only. It closes no runtime issue. It provides the evidence needed to review the Stop and hung-turn issue group.

Dependencies

Independent documentation on top of the RFC branch.

How to review

  1. Verify the cancel and kill sequence diagrams.
  2. Verify every Redis key writer, reader, and expiry.
  3. Check the approval and concurrent-send branches.
  4. Confirm each RFC contradiction against the cited code.

Trace the Stop path end to end in current code: desktop and mobile
entry points, the API cancel branch and every Redis key it touches,
the heartbeat that carries the signal, the runner abort, sandbox
teardown, records, and interactions.

Headline findings, each verified in code:
- Stop destroys the warm sandbox (shouldPark refuses an aborted turn).
- Stop reaches the runner only on the next 30s heartbeat.
- The abort sends no cancel request to the harness except on Pi.
- A stopped turn is indistinguishable from a completed one in Postgres.
- Cancel leaves pending approvals pending; only kill clears them.
- Mobile Stop on the user's own turn never calls the server.
- The orphan sweep cannot clear a wedged turn (#6418), because the
  wedged turn's own heartbeat keeps updated_at fresh.

Includes two sequence diagrams, a Redis key table, a file-by-file
change map for version one, and the RFC claims the code contradicts.

Claude-Session: https://claude.ai/code/session_01GAqSs7fw6QRi2n1ZJ2tmAV
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agenta-documentation Ready Ready Preview Sep 2, 2026 10:15pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • release/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: 37b0905e-3ccd-4925-9d29-b9f13c826ea2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mmabrouk mmabrouk changed the title [overnight] docs(sessions): map of the current Stop path (Spike C) docs(sessions): map the current Stop and ownership paths Sep 3, 2026
@mmabrouk
mmabrouk marked this pull request as ready for review September 3, 2026 11:15
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📘 Docs preview

Status ✅ Ready
Preview https://pr-6498-agenta-docs-preview.mahmoud-637.workers.dev/docs
Inspect Actions run
Commit 1099df4ba3c3a027ffcb2127f979437189dbdb51

This comment updates in place on every push.

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