Skip to content

feat(runtime): add agent_task_attempt_ref for fenced continuation - #688

Merged
yyjeqhc merged 5 commits into
yyjeqhc:mainfrom
rainhuang0220:feat/agent-task-attempt-ref
Sep 26, 2026
Merged

yyjeqhc merged 5 commits into
yyjeqhc:mainfrom
rainhuang0220:feat/agent-task-attempt-ref

Conversation

@rainhuang0220

Copy link
Copy Markdown
Contributor

Refs #575

Add a server-issued agent_task_attempt_ref for one exact fenced
AgentTask Attempt.

The ref is:

  • principal-scoped
  • pinned to one task, attempt, assignee, fence, and controller generation
  • not a capability token

start_agent_task_endpoint_continuation accepts the ref or the existing
explicit tuple. Resolution continues through the existing owner, lease,
fence, and generation checks.

Heartbeat, completion, coding-run, and reconcile remain on explicit tuple
inputs. This keeps the selector separate from execution authority.

Stale refs do not retarget after:

  • controller replacement
  • lease expiry
  • assignee takeover

Validation:

  • cargo test -p webcodex-store --lib agent_task
  • cargo test -p webcodex-tool-contracts --lib
  • cargo test -p webcodex-tool-runtime-contracts --lib
  • cargo test -p webcodex --lib agent_task
  • mcp_compact_descriptions_preserve_selection_and_schema_literals
  • tool_specs_descriptions_fit_model_budget
  • tool_specs_required_fields_match_deserialization

A short selector names one exact task, attempt, assignee, fence, and
controller generation for one communication principal. A later generation,
fence, or assignee gets a new index and does not rewrite the old row.
The mapping is not authority.
start_agent_task_attempt returns attempt_ref for the exact fence and
controller generation it created. start_agent_task_endpoint_continuation
accepts that ref or the existing tuple, then runs the same owner, lease,
fence, and generation checks. Heartbeat, completion, and coding-run keep
the explicit tuple.
Copilot AI lite review requested due to automatic review settings September 26, 2026 04:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@yyjeqhc
yyjeqhc merged commit 4557e66 into yyjeqhc:main Sep 26, 2026
15 checks passed
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.

3 participants