Skip to content

Record OpenShell's sandbox exec/stop signal contract in an ADR so PR #7208's dead end isn't rediscovered #7229

Closed

Description

@fullsend-ai-retro

What happened

PR #7208 (#7208) spent a full day and 5 automated review cycles iterating on a mechanism to SIGINT a sandboxed process via openshell sandbox exec so Claude Code could flush total_cost_usd before a cancelled run tore down. The review agent (fullsend-ai/agents@main) never raised the fundamental blocker. Only a human reviewer's comment at 19:15 UTC on 09-10, and the PR author's follow-up research the next day (citing NVIDIA/OpenShell issues #3159, #3036, #2855), established that sandbox exec is fire-and-forget by design and cannot reliably signal the target process tree, and that sandbox stop sends SIGKILL rather than SIGINT. The PR was closed unmerged on 2026-09-11 based on this finding. docs/ADRs/0030-openshell-sandbox-interaction-model.md covers exec-vs-SSH and credential/gateway tradeoffs but has no mention of signal/lifecycle semantics, and internal/sandbox/sandbox.go has no comments capturing this either — a follow-up search confirmed this knowledge exists nowhere in the repo, only in the closed PR's GitHub comment thread.

What could go better

This is a case of real, hard-won domain knowledge (validated against upstream issue trackers) that is at risk of being lost, since it lives only in a closed, unmerged PR's discussion rather than in a discoverable, citable location. A future contributor (human or the code agent, since issue #6936 is closed but a related feature request could reopen this) could easily re-attempt the same sandbox-exec-SIGINT approach and burn another 5+ review cycles before rediscovering the same blocker. I'm confident this specific fact is undocumented (confirmed via grep across ADRs and sandbox.go plus an open-issue search), but I can't be certain whether the org considers this dead end permanently closed or worth reopening later with a different mechanism — that's a product decision outside this retro's scope.

Proposed change

Add a short section to docs/ADRs/0030-openshell-sandbox-interaction-model.md (or a new small ADR if the team prefers not to reopen an Accepted ADR) stating: (a) openshell sandbox exec is fire-and-forget and does not reliably deliver signals to the invoked process tree, (b) openshell sandbox stop sends SIGKILL, not SIGINT, so neither primitive supports graceful in-sandbox shutdown for telemetry-flush purposes, (c) cite NVIDIA/OpenShell #3159, #3036, #2855 as the upstream evidence, and (d) cross-reference issue #6936 / merged PR #6938 (token-count persistence, the accepted partial fix) and closed PR #7208 (the abandoned dollar-cost attempt) as the historical record of why a fuller fix was not pursued.

Validation criteria

Within the next 90 days or the next 3 PRs/issues that propose signaling into or gracefully stopping an OpenShell sandbox process, the review agent or a human reviewer cites this ADR section in the first review round (rather than discovering the blocker after multiple rounds, as happened in PR #7208).


Generated by retro agent from #7208

Activity

  1. added
    ready-for-triage
    on Sep 11, 2026
  2. fullsend-ai-triage commented on Sep 11, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 12:05 PM UTC · Completed 12:09 PM UTC

    Commit: 25d0852 · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $0.32

  3. added
    component/docs
    component/sandbox
    priority/low
    ready-to-code
    on Sep 11, 2026
  4. fullsend-ai-triage commented on Sep 11, 2026

    @fullsend-ai-triage

    Cross-checked this against PR #7208's actual review thread: a human reviewer's comment and the PR author's close-out both confirm the finding as described -- sandbox exec does not reliably signal the process tree, and sandbox stop sends SIGKILL. No open PR or issue currently addresses this gap (a neighboring issue, #7230, covers a related but distinct documentation task about computing dollar cost from token telemetry).

    On the open question of whether to edit the Accepted ADR 0030 or write a new one: per this repo's ADR conventions (docs/contributing/adrs.md), Accepted ADRs may receive minor annotations -- short notes, cross-references, consequence updates -- without superseding them, as long as the underlying decision isn't reversed. Since ADR 0030 already chose SSH over OpenShell native commands for execution, and this new evidence only explains why the rejected native-commands path fails for signaling (rather than changing the decision), a short annotation to the existing ADR is the right fit -- no new ADR needed.

    Severity is low: this is a knowledge-retention/process-quality gap rather than a functional defect, with a generous 90-day validation window already proposed in the issue.


    Labels: Matches the labeling pattern used on the analogous ADR-documentation issue #6423 (component/docs, documentation) plus component/sandbox since the subject matter is OpenShell sandbox lifecycle, and priority/low given the 90-day validation window and non-urgent nature.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  5. fullsend-ai-coder commented on Sep 11, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 12:11 PM UTC · Completed 12:19 PM UTC

    Commit: 25d0852 · View workflow run →

    Runtime: pi · Model: xai/grok-4.6 · Effort: high · Cost: $2.67

  6. added a commit that references this issue on Sep 11, 2026
  7. added 2 commits that reference this issue on Sep 26, 2026
  8. 28 remaining items

  9. added 13 commits that reference this issue on Sep 29, 2026
  10. added a commit that references this issue on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/docscomponent/sandboxdocumentationpriority/lowready-for-triageready-to-code

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions