paperclip/doc
Dotta c9e3bb7ca4
fix: preserve queued work after native Stop and honor steering support (#13354)
## Thinking Path

> - Paperclip lets people manage AI agents and their tasks.
> - The runner owns execution, while the task keeps user instructions
and status.
> - Stop must stop the current response without losing instructions that
the user already sent.
> - The queue stored its original reason inside saved context. Recovery
checked the outer deferred reason and left the message waiting.
> - Claude also exposed Steer through a shared method even though its
driver did not support it. A rejected request could remove its own error
row.
> - This pull request keeps queued work until execution has stopped,
uses the driver's real capability, and preserves completion event order.
> - Users can continue work without repairing task state or repeating
messages.

## Linked Issues or Issue Description

Refs #13338. Related recovery work: #13353.

**What happened?**

A message sent during a native run stayed queued after Stop. Claude
exposed an unsupported Steer action. A steering failure could hide the
queued row and its error. A terminal event could also precede the final
provider result, and subtree Stop omitted the board actor.

**Expected behavior**

Stop ends the current execution. Once Paperclip proves that execution
has stopped, it delivers the saved instruction once through normal
admission. Pause and recovery holds still prevent dispatch. Unsupported
controls stay disabled, and a rejected action leaves an actionable error
visible. Final results precede terminal events.

**Steps to reproduce**

1. Start a Claude or Codex task that writes a file and then waits.
2. Send a follow-up instruction while it runs.
3. Press Stop. Check that the queued instruction runs once and preserves
the file.
4. Check Claude's Steer control and simulate a server rejection on the
only queued message.

## What Changed

- Recover saved native comments after acknowledged Stop using their
original wake reason.
- Require durable remote termination receipts or verified local process
termination before dispatch.
- Preserve actor identity, queued-message deduplication, Pause, and
recovery gates.
- Derive steering support from the driver descriptor and reject
unsupported calls.
- Keep the queue mounted until a steering request succeeds so its error
remains visible.
- Emit provider results before terminal events and pass the board actor
into subtree Stop.
- Document Stop and steering behavior.

## Verification

- Final-head continuation suite: 104 passed, after failing regressions
for saved wake reasons, cleanup proof, and deduplication of every queued
message. Steering UI: 121 passed. Driver capability: 26 passed. Runner
backend/transport: 205 passed; Rust library: 285 passed.
- Real Claude and Codex browser journeys both preserved the saved file,
delivered the queued instruction once after Stop, and reached Done with
exactly two total runs. The process Stop browser fixture also passed.
- Local full repository typecheck and build passed on `afaa35139`;
server typecheck and the affected 104-test suite passed after the final
queue changes. Token gates passed. Final-head CI verifies the complete
integrated source.
- Local aggregate evidence has explicit limits: the general-server
invocation overlapped the queue fixes and finished with 11,989 passed, 2
failed, and 80 skipped; both failures are covered by the final 104-test
pass. The UI and CLI then passed all 6,184 and 485 tests; the complete
145-file serialized rerun passed all 2470 tests. The shared-package lock
fixture passed unchanged on rerun, but the package phase subsequently
stopped at an embedded-Postgres bootstrap resource failure. No single
pristine green local full aggregate is claimed.
- Greptile reviewed `fa66e2bd5` at [5/5 with no unresolved
findings](https://github.com/paperclipai/paperclip/pull/13354#issuecomment-5650334242).
[Final-head CI completed
successfully](https://github.com/paperclipai/paperclip/actions/runs/34733781888/attempts/2):
33 successful checks, 2 conditional skips, including all server,
package, UI, browser, runner, typecheck, and build gates. The first
attempt hit a preview-readiness/port-collision fixture; its unchanged
local control passed 25 tests with 3 skips, and one supported unchanged
CI retry passed the affected shard and aggregate gates.

## Risks

- Queue recovery must never overlap an old execution. Unknown cleanup
state remains blocked.
- Driver descriptors are now authoritative for steering; a wrong
descriptor disables the action instead of attempting it.
- No schema migration or historical status reconciliation is included.

## Model Used

OpenAI GPT-6 through Codex, with reasoning, code execution, browser
testing, and tool use. The exact hosted model ID and context-window size
are not exposed in this task.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` OR (b) described the issue in-PR following the relevant issue
template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-12 22:29:54 -05:00
..
architecture fix: require explicit native completion reviews (#13314) 2026-09-12 13:00:04 -05:00
assets fix: make task recovery durable and preserve current requests (#13075) 2026-09-09 09:14:25 -05:00
connections fix: let responsible users choose either AI subscription or API key (#13351) 2026-09-12 20:27:26 -05:00
design refactor: remove automatic productivity reviews (#13263) 2026-09-11 15:46:35 -05:00
experimental feat(server): configure shared workspace concurrency (#10759) 2026-08-03 14:25:05 -05:00
logs Improve CLI API parity coverage (#6626) 2026-06-02 17:13:29 -07:00
plans fix: preserve runner recovery, warm sessions, and task outcomes (#13338) 2026-09-12 19:41:15 -05:00
plugins fix(heartbeat): block runs on a stuck sandbox plugin and re-enable errored bundled plugins at boot (#12957) 2026-09-08 09:00:10 -07:00
pr/5429 Add secrets provider vaults and remote import (#5429) 2026-05-09 18:22:17 -05:00
screenshots feat(mcp) [split 7/8]: activate Apps and gateway UI (#9562) 2026-07-14 15:40:08 -05:00
spec feat(adapters): confine local coding processes (#9504) 2026-07-14 11:01:19 -05:00
testing feat: simplify agent onboarding and configuration (#13011) 2026-09-08 14:22:32 -05:00
AGENT-ARTIFACTS.md feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
AGENTCOMPANIES_SPEC_INVENTORY.md Add routine support to recurring task portability 2026-03-23 16:57:38 -05:00
CHANNELS.md feat(cli): add 'paperclipai channels' to show release lanes and the current one (#11210) 2026-08-11 08:47:32 -07:00
CLI.md feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
CLIPHUB.md refactor: rename packages to @paperclipai and CLI binary to paperclipai 2026-03-03 08:45:26 -06:00
DATABASE.md feat: add experimental persistent agent chat (#13284) 2026-09-12 08:56:04 -05:00
DEPLOYMENT-MODES.md fix(security): harden privileged server boundaries (#12776) 2026-09-03 14:15:32 -05:00
DEVELOPING.md fix: recover sandbox workspace setup and retries (#13353) 2026-09-12 22:19:42 -05:00
DOCKER.md fix(ci): reuse one available Cloud registry cache (#13334) 2026-09-12 13:20:18 -07:00
GOAL.md [codex] Refresh docs and agent skills (#4693) 2026-04-28 16:12:03 -05:00
HERMES_GATEWAY_ONBOARDING.md fix(security): route paperclipai CLI guidance through safe npx form (CWE-78) (#11400) 2026-08-14 22:11:16 -07:00
HERMES_GATEWAY_SMOKE.md [codex] Add built-in Hermes adapters (#8543) 2026-06-26 16:04:58 -05:00
INSTALLING.md fix(adapters): prevent engine fallback and preserve usable runtime defaults (#13105) 2026-09-09 13:27:24 -05:00
LOW-TRUST-PRESETS.md docs(execution-semantics): define routable blocking and watchdog restoration (#10094) 2026-07-27 19:10:28 -05:00
MCP-ACCESS-GOVERNANCE.md feat(mcp) [split 8/8]: add e2e coverage and operator docs (#9563) 2026-07-14 15:48:57 -05:00
MCP-DEMO-SCRIPT.md feat(mcp) [split 8/8]: add e2e coverage and operator docs (#9563) 2026-07-14 15:48:57 -05:00
MCP-RUNTIME-OPERATIONS.md feat(apps): consolidate connector management (#12684) 2026-09-01 14:55:35 -05:00
OPENCLAW_ONBOARDING.md Introduce bind presets for deployment setup 2026-04-11 07:09:07 -05:00
PRODUCT.md feat(channels): add experimental iMessage Photon (#13299) 2026-09-12 15:23:50 -05:00
PUBLISHING.md feat(release): bootstrap new npm packages with a placeholder publish (#11757) 2026-08-19 19:38:17 -07:00
README-draft.md docs: add README, draft README, and adapter logo assets 2026-03-02 10:31:59 -06:00
RELEASE-AUTOMATION-SETUP.md ci: keep Cloud readiness markers out of the builder queue (#13330) 2026-09-12 12:32:46 -07:00
RELEASE-CHECKLIST.md feat(release): draft stable notes at beta publish, read them from master at promotion (#11567) 2026-08-17 20:47:23 -07:00
RELEASE-NOTES-mcp-access-governance.md feat(mcp) [split 8/8]: add e2e coverage and operator docs (#9563) 2026-07-14 15:48:57 -05:00
RELEASING.md feat(release): draft stable notes at beta publish, read them from master at promotion (#11567) 2026-08-17 20:47:23 -07:00
SEARCH.md fix: improve task search relevance with a PostgreSQL rubric (#13335) 2026-09-12 16:22:58 -05:00
SECRETS-AWS-PROVIDER.md feat(secrets): add user-specific runtime secrets (#8825) 2026-07-05 05:58:20 -05:00
SPEC-implementation.md feat: manage AI runtime credentials through Connections (#13247) 2026-09-12 16:30:10 -05:00
SPEC.md fix: improve task search relevance with a PostgreSQL rubric (#13335) 2026-09-12 16:22:58 -05:00
STORYBOOK-DEPLOYMENT.md feat: add readable Storybook branch bookmarks (#13231) 2026-09-11 10:19:36 -05:00
TASK-WATCHDOG.md fix(interactions): authorize resolvers consistently (#11376) 2026-08-16 13:46:50 -05:00
TASKS-mcp.md Add product spec and MCP task interface docs 2026-02-16 19:07:30 -06:00
TASKS.md Add task management data model spec 2026-02-16 14:25:00 -06:00
TELEMETRY_WORKFLOW.md Add telemetry proposal extractor (#9544) 2026-07-13 23:47:27 -07:00
UNTRUSTED-PR-REVIEW.md chore(docker): improve base image and organize docker files 2026-04-01 11:36:27 +00:00
acp-run-lifecycle.md refactor: disambiguate the Telemetry and Observability data paths (#12128) 2026-08-24 16:42:33 -07:00
cloud-build-readiness.md ci: reuse dependency caches without per-PR uploads (#13300) 2026-09-11 17:31:15 -07:00
cloud-ui-snippet.md feat: accept a base64-encoded Cloud UI snippet (#13245) 2026-09-11 14:13:11 -07:00
composer-stop.md fix(tasks): require resume before sending to paused tasks (#13232) 2026-09-11 10:28:00 -05:00
connection-intents.md fix(connections): keep task context through Cloud enrollment and OAuth (#13098) 2026-09-09 10:55:11 -05:00
execution-github-identity.md feat: add experimental native chat connectors (#13038) 2026-09-10 10:06:45 -05:00
execution-semantics.md fix: preserve queued work after native Stop and honor steering support (#13354) 2026-09-12 22:29:54 -05:00
memory-landscape.md chore: improve worktree tooling and security docs 2026-04-10 22:26:30 -05:00
observability.md feat(adapter-utils): carry binary bodies and attachment routes over the HTTP/2 sandbox bridge (#12923) 2026-09-08 14:18:12 -07:00
preview-release-artifacts.md fix(release): publish exact-source cloud migrators on merge (#13188) 2026-09-10 21:07:38 -07:00
project-repositories.md feat(projects): select multiple GitHub source repositories (#13010) 2026-09-08 08:21:28 -05:00
run-log-events.md fix: preserve runner recovery, warm sessions, and task outcomes (#13338) 2026-09-12 19:41:15 -05:00
runner-api-tools.md feat(runner): add guarded API search and call fallback (#13003) 2026-09-07 14:14:43 -05:00