Repository navigation
Description
Summary
Journey Impact: extends: J05 ("I can schedule work, walk away, and find out what happened").
A scheduled run that needs a decision files a new ask even when an earlier run already asked the same thing and is still waiting. The person ends up with several pending asks about one subject, the older ones out of date, and no way to tell which one is current. The agent has no way to see its own open asks at the start of a run, and no way to replace one when the facts changed.
Context
Raised by the operator on 2026-10-05: asks and notifications pile up, a later one makes an earlier one irrelevant, and both stay pending.
What an agent knows today:
- At the start of a run the Execution Context lists its asks that ended in the last 24 hours. It does not list the ones still pending, so a fresh run cannot know it already asked.
- The ask contract tells agents to derive
request_idfrom the current execution id. That makes a retry safe, and it also makes two runs about the same subject look unrelated. - An agent can re-ask after an ask expired (
supersedes_expired). It cannot say "this replaces my earlier ask" while that one is still pending.
Two costs: the person's list holds asks that are no longer true, and stale asks count toward the agent's open-ask limit, so they can get its real asks refused (queue_full).
Acceptance Criteria
- At the start of every run an agent is shown its own pending asks (id, type, title, age), beside the ended ones, bounded in size like that list.
- The ask contract (tool description and platform prompt) says: do not re-ask what is still pending; if the facts changed, replace the earlier ask.
- An agent can raise an ask that replaces one of its own pending asks. The earlier ask ends with a recorded ending that says it was replaced and links to the new one. It leaves the pending set on every surface, can no longer be answered, and stops counting toward the open-ask limit.
- An approval is never changed in place: what a person is reading is what they approve. Replacing always ends the old ask and shows a new one.
- If a person answers the earlier ask before the replacement lands, the answer stands and the agent is told so instead of getting a silent replace.
- An agent can replace only its own asks, never a platform-raised item or another agent's.
- The replaced ask shows as replaced, with a link to its successor, wherever ended asks are shown.
- Tests: the pending list reaches the agent's context; a replace ends the old ask and creates the new one in one step; the race with a person's answer; the open-ask limit after a replace; the cross-agent refusal.
Scope note
This is the narrow part of abilityai/trinity-enterprise#619 (supersede, priority inheritance, withdrawal), pulled forward: replace-my-own-pending-ask only. Priority inheritance, withdrawal without a successor and the wider correction flow stay with that issue.
Related
- Agents write long, compound asks — teach atomic asks in the ask_operator contract and cap option count/length #3243: ask authoring rules in the same contract text. Build this on top of it.
- Approval asks have no "something else" answer — the person must pick an option they reject before Send unlocks #3242: the "Something else" answer.
- bug: platform alerts pile up in the operator queue — every new reading files a new row and nothing ends the ones that are no longer true #3246: the platform-alert half of the same pile-up.
Activity
feat(operator-queue): the replace link — two columns on both tracks (#…
feat(operator-queue): the atomic replace in the db layer (#3247)
feat(operator-queue): the sink replaces one of the agent's own pendin…
feat(operator-queue): the pending line in the Execution Context (#3247)
feat(operator-queue): contract text for replacing a pending ask (#3247)
feat(operator-queue): Operations and /m show a replaced ask (#3247)
feat(operator-queue): the Workspace shows a replaced ask (#3247)
docs(operator-queue): replacing a pending ask, and the claims it made…
fix(operator-queue): F1 — the already_pending guard is the agent's ow…
fix(operator-queue): F2 — the already_pending guard inside the lock, …
23 remaining items
fix(operator-queue): F3 — restore the recommended fleet prompt page t…
Merge remote-tracking branch 'origin/dev' into feature/3247-replace-p…
fix(operator-queue): F4 — ask titles by allowlist, the collide test p…
merge-train: merge dev, rebuild tests/registry.json from the merge st…
fix(operator-queue): the Pending asks line never carries an ask's tit…
feat(operator-queue): an agent sees its pending asks and can replace …
fix(operator-queue): the replace-path expiry audit row names an unkno…
fix(operator-queue): an expired approval the platform did not hold is…
Merge origin/dev into feature/ent810-assignments-admin-ui; re-chain p…