Skip to content

Expose Lody tasks, subagents and usage over ACP - #14

Draft
leynos wants to merge 8 commits into
fix/acp-unresolved-tool-recoveryfrom
fix/acp-lody-task-lifecycle-negotiation
Draft

Expose Lody tasks, subagents and usage over ACP#14
leynos wants to merge 8 commits into
fix/acp-unresolved-tool-recoveryfrom
fix/acp-lody-task-lifecycle-negotiation

Conversation

@leynos

@leynos leynos commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

This branch makes VTCode's ACP server negotiate and publish the Lody task,
subagent, and provider-usage surfaces that it actually implements. It replaces
the ignored private lifecycle notification with standard ACP tool updates,
adds session-scoped management for owned foreground and background work, and
emits normalized per-response usage without inventing absent provider data.

It also adds an explicit, proxy-safe supports_stream_usage opt-in for custom
OpenAI-chat providers. This allows compatible Baseten profiles to request and
retain terminal usage chunks while leaving existing custom-provider request
bodies unchanged.

ExecPlan: ACP Lody task lifecycle negotiation

Review walkthrough

Validation

  • Focused ACP capability, mapping, property, recovery, and duplex tests: 9 passed.
  • Custom-provider configuration tests: 4 passed.
  • Wiremock terminal-usage playback: 1 passed.
  • Vidai-mock Baseten-shaped streaming physics: 1 passed.
  • ./scripts/check.sh: 6,588 tests passed, 16 skipped; 33 harness tests passed, with formatting, security, logging, governance, Clippy, build, PTY/TUI, and documentation checks green.
  • cargo install --path . --locked --force: installed successfully at user level after each code/documentation milestone.

Notes

  • Lody usage capability version 1 is always advertised; a notification is sent only when a successful provider response contains normalized usage.
  • Subagent management and background-task capability flags are conditional on the corresponding VTCode controller/runtime support.
  • Legacy ownerless background records remain loadable but are hidden from ACP management; VTCode never assumes ownership after restart.
  • Scheduled tasks, richer provider-specific usage detail, provider limits, compaction notices, and final-answer phase metadata remain independent follow-ups.
  • The configuration reference generator completed successfully, but its unrelated pre-existing full-file drift was excluded; this branch retains only the two new schema rows.

leynos added 7 commits August 28, 2026 13:16
Define the staged implementation and verification strategy for replacing
VTCode's private task lifecycle notification with standard ACP tool updates,
negotiating Lody task and subagent management, and emitting per-response
provider usage.

Include an opt-in custom-provider streaming-usage capability so Baseten can
return terminal usage without changing requests sent to stricter compatible
proxies.
Replace the private lifecycle notification with standard ACP tool calls and
updates carrying versioned Lody task metadata. Preserve per-session filtering
and stable task identifiers while preventing runtime and transcript details
from leaking into client metadata.

Advertise lifecycle support only when the ACP agent has a subagent controller.
Keep management and background-task capabilities absent until their handlers
exist.

Cover the adapter with status-table unit tests, stable-ID property tests, and
an official ACP duplex behavioural test.
Mark the standard ACP lifecycle plateau complete with its red, green, gate,
commit, and installation evidence.

Pause management work because persisted background records do not carry an
explicit owning ACP session. Record the related output-tail and extension
dispatch gaps so the required model/API expansion can be decided before any
cross-session management capability is advertised.
Record the approved persisted-owner and bounded-output design so EP-M2 can
resume without exposing legacy ownerless background records through ACP.
Negotiate Lody list, cancel, output, and enabled background-task support.
Persist explicit background ownership, fail closed for legacy ownerless records,
and merge scoped state updates without deleting other sessions records.
Cover ownership with unit, property, and official ACP duplex tests.
Advertise the versioned Lody usage extension and emit one normalized usage
delta for every successful provider response, including intermediate
tool-loop responses. Preserve absent metrics rather than fabricating them.

Add an opt-in custom-provider capability for OpenAI-compatible streamed
usage. Provider defaults and per-model profiles use sparse precedence, so
existing proxy request bodies remain unchanged while compatible Baseten
profiles can request and retain terminal usage chunks.

Cover the adapter with capability, unit, property, official ACP duplex,
wiremock playback, and vidai-mock physics tests.
Describe the current stdio ACP server separately from the legacy REST client,
including Lody capability negotiation, standard task lifecycle updates,
session-scoped subagent management, and per-response usage notifications.

Document the opt-in custom-provider streamed-usage flag, its sparse profile
precedence, proxy-safe default, terminal usage chunk, and native OpenAI
compatibility. Add the corresponding generated-reference rows and record the
delivery evidence in the living ExecPlan.
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Warning

Your free Security trial is over. An organization admin can activate Security or dismiss this notice.


Comment @coderabbitai help to get the list of available commands.

Close the execution plan after the complete release gate, user-level
installation, and publication of draft PR #14 as the fourth layer of the
VTCode ACP repair stack.
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