Skip to content

Add progress updates for inbound A2A work - #64

Open
dimavrem22 wants to merge 6 commits into
mainfrom
feat/a2a-worker-progress
Open

Add progress updates for inbound A2A work#64
dimavrem22 wants to merge 6 commits into
mainfrom
feat/a2a-worker-progress

Conversation

@dimavrem22

@dimavrem22 dimavrem22 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Executive Summary

Adds immediate acknowledgement and periodic progress reporting for inbound A2A worker tasks.

  • Defaults to one short progress update every three minutes, with a configurable interval.
  • Journals acknowledgement and progress delivery so retries do not duplicate messages.
  • Keeps nonterminal progress visible in task history without waking the delegating Claude session.

Description

The gateway now acknowledges an inbound A2A task before starting its Claude Code turn and owns a referenced progress runner for the lifetime of that worker turn. Progress copy comes from an isolated, tool-free, one-turn Claude session using the task text and at most eight normalized tool identifiers of 80 characters each. Tool arguments and results are never retained or included. Unsafe, terminal, empty, or tool-identifier-echoing model output uses one generic nonterminal fallback.

Acknowledgements and pending progress messages are persisted before delivery and reconciled against authoritative task history after retries. Completion, cancellation, terminal server state, and gateway shutdown stop the runner before further updates. The default interval is 180 seconds through INKBOX_A2A_PROGRESS_INTERVAL_SECONDS.

Reason

Long-running A2A tasks previously appeared idle until their final response. Prompt pickup confirmation and occasional concise updates make active work visible without spending a full requester turn on each progress event.

Decisions

  • Default cadence: Use three minutes to provide reassurance without making ordinary tasks noisy.
  • Progress context: Let the isolated side model interpret bounded normalized tool identifiers instead of maintaining a keyword taxonomy or activity-specific canned messages.
  • Requester behavior: Ignore submitted/working update events in the delegating Claude session because progress is informational task history, while actionable and terminal states still wake it.
  • Delivery safety: Persist pending text and reconcile authoritative history before retries so ambiguous responses cannot create duplicate acknowledgements or progress messages.

Testing

  • uv run --with pytest pytest -q --ignore=tests/contract: 488 passed, 23 skipped.
  • uv run --with pytest pytest -q tests/contract: 5 passed against the installed Claude Agent SDK and Claude Code CLI.
  • uv build: source distribution and wheel built successfully, including the progress module.
  • Inbound A2A worker behavior: Expect an immediate acknowledgement naming the configured three-minute cadence, periodic nonterminal updates, and no update after settlement.
  • Progress summary isolation: Expect no tools, tool arguments, or tool results in the side turn; unsafe output must use the generic fallback.
  • Delegated A2A progress: Expect working/submitted updates to remain in task history without waking the main Claude session.
  • Live inbound-progress scenario: Expect a one-minute CI-only cadence, two ordered nonterminal summaries with at least one descriptive/non-fallback summary, and final result 4 + 6 = 10 with the unique marker.

@dimavrem22
dimavrem22 force-pushed the feat/a2a-worker-progress branch 6 times, most recently from d95f36a to 26dd9b2 Compare August 15, 2026 08:17
@dimavrem22
dimavrem22 force-pushed the feat/a2a-worker-progress branch from 26dd9b2 to 6453142 Compare August 15, 2026 08:28
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.

1 participant