Skip to content

Commit c428e34

Browse files
committed
docs(mobile): the interaction row now carries the gated turn's config
Records what landed on the backend lanes of the effective-turn-config plan and notes in the approvals round-trip that a pre-change row (or one over the stamp cap) is still answerable, degrading to reference hydration.
1 parent 8a746c5 commit c428e34

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

docs/design/agenta-mobile/plans/2026-07-27-mobile-approvals-steering.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,22 @@ watchdog heartbeats `POST /sessions/streams/heartbeat` every 30s (`sessions/aliv
4646
(`services/runner/src/engines/sandbox_agent/acp-interactions.ts:166-200`) emits stream event
4747
`{type:"interaction_request", kind:"user_approval", payload:{toolCallId, toolCall,
4848
availableReplies, options}}`, creates a durable **interactions row** (kind `user_approval`,
49-
status `pending`, `data.request={tool,args}` + stored workflow `references`
50-
`services/runner/src/sessions/interactions.ts:55-93``POST /sessions/interactions/`), and
49+
status `pending`, `data.request={tool,args}` + stored workflow `references` + the turn's
50+
**effective config** `data.parameters`
51+
`services/runner/src/sessions/interactions.ts` `buildInteractionData`
52+
`POST /sessions/interactions/`), and
5153
the turn ends `stopReason:"paused"`. The sandbox **parks warm** in the in-process
5254
`SessionPool` (`awaiting_approval`, TTL `approvalTtlMs` = **5 min**,
5355
`session-identity.ts:31,34`; `server.ts:427-455`). After TTL: sandbox evicted, the pending
5456
row stays actionable for **7 days** (`interactions/dao.py:31`, 209-214).
57+
> **`data.parameters` (effective-turn-config plan, 2026-07-29).** The row now carries the
58+
> post-hydration config the gated turn was RUNNING, stamped by the SDK onto the `/run` wire
59+
> as `effectiveParameters` and echoed here opaquely by the runner. An out-of-band answer
60+
> replays it as the resume's `data.parameters`, which suppresses reference hydration and
61+
> reproduces the turn — without it a references-only resume runs the referenced variant's
62+
> HEAD revision, which for a dirty run means the wrong model, instructions and **tool
63+
> permissions**. A row written before this landed (or one whose config was over the 64 KB
64+
> stamp cap) has no `parameters` and is still answerable — it just degrades to hydration.
5565
2. **Durable visibility (twice over):** the `interaction_request` event is a session record
5666
(replayable), and the interactions row is queryable via `POST /sessions/interactions/query`
5767
`{query:{session_id?, actionable_only:true}}``session_id` is OPTIONAL

docs/design/agenta-mobile/plans/2026-07-29-effective-turn-config.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Effective turn config on HITL resume — design & plan
22

3-
**Status:** PLANNED · **Date:** 2026-07-29 · **Branch:** `feat/agenta-mobile-wave-1`
3+
**Status:** BACKEND LANDED (T1–T8, T13) · client lanes T9–T12 open ·
4+
**Date:** 2026-07-29 · **Branch:** `feat/agenta-mobile-wave-1`
5+
6+
> **Landed:** the SDK stamps `effectiveParameters` on the `/run` wire (session runs only,
7+
> redacted + 64 KB-capped — `sdks/python/agenta/sdk/agents/utils/effective_config.py`); the
8+
> runner echoes it into the interaction row's `data.parameters`
9+
> (`buildInteractionData`, `services/runner/src/sessions/interactions.ts`) and it is
10+
> deliberately excluded from `configFingerprint`; the API declares `parameters` on
11+
> `SessionInteractionData` and the M2 dispatcher sends it inline. **The runner half needs a
12+
> runner restart to go live** (no TypeScript hot-reload); the SDK and API halves reload in
13+
> place and were verified against the live EE dev stack.
414
**Goal:** when an approval is answered from a client that cannot reproduce the turn's config
515
(mobile, the M2 detached dispatcher), the resumed run must continue under **the config the
616
gated turn was actually running**, not under whatever the referenced variant's HEAD revision

0 commit comments

Comments
 (0)