Skip to content

Show ACP tool arguments in progress summaries - #243

Merged
matdev83 merged 2 commits into
mainfrom
agent/show-acp-tool-arguments
Jul 31, 2026
Merged

Show ACP tool arguments in progress summaries#243
matdev83 merged 2 commits into
mainfrom
agent/show-acp-tool-arguments

Conversation

@matdev83

Copy link
Copy Markdown
Owner

What changed

  • preserve structured ACP tool input payloads in the per-call accumulator
  • render compact JSON arguments in completed and flushed tool summaries
  • bound displayed arguments to 1,024 characters with an explicit truncation marker
  • keep the existing exported summary formatter backward compatible

Why

The AGY ACP wrapper already sends tool parameters through rawInput. Go LIP retained only their byte count, so clients saw tool names and sizes without the paths, queries, or command arguments needed to understand progress.

User impact

ACP progress summaries now show useful tool arguments while remaining bounded for large payloads.

Verification

  • go test ./... -count=1 in connector-support/acp
  • go vet ./... in connector-support/acp

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@matdev83, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c8fcdbe9-bf63-4461-9fa0-7b09c4612515

📥 Commits

Reviewing files that changed from the base of the PR and between d207cb3 and e80052e.

📒 Files selected for processing (2)
  • connector-support/acp/tool_summary.go
  • connector-support/acp/tool_summary_test.go
📝 Walkthrough

Summary by CodeRabbit

  • Enhancements
    • Tool completion and incomplete-operation summaries now include formatted input arguments for clearer context.
    • Input details are recognized across multiple supported formats and rendered consistently.
    • Long argument values are compacted and safely truncated with a visible truncation marker.
    • Summaries continue to report output size information while preserving the existing summary format.

Walkthrough

Tool summaries now retain the first extracted input payload, compute its JSON size, and include formatted arguments. Extraction supports multiple input fields. Argument output uses compact or fallback rendering and truncates long values.

Changes

Tool summary formatting

Layer / File(s) Summary
Input capture and summary wiring
connector-support/acp/tool_summary.go
Tool accumulation stores the first available input payload and its JSON size. Completion and incomplete-tool summaries use the input-aware formatter.
Argument rendering and validation
connector-support/acp/tool_summary.go, connector-support/acp/tool_summary_test.go
The formatter serializes arguments, applies fallback rendering, truncates output at 1,024 runes, and tests serialized and truncated arguments.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the technical change: showing ACP tool arguments in progress summaries.
Description check ✅ Passed The description directly explains the implementation, user impact, compatibility, and verification for the ACP tool summary changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Secrets ✅ Passed The PR adds only ACP input formatting and tests; added literals contain no credentials, API keys, tokens, passwords, private keys, or sensitive internal URLs.
Context Propagation ✅ Passed The existing stream passes its context through MapLine, parseNDJSONLine, and HandleToolUpdate; this patch adds no goroutines or network calls, and retains the synchronous mutex-protected path.
No Accidental Public Api Break ✅ Passed Only ACP implementation/tests changed; exported signatures match the parent, and FormatToolCompletionSummary still emits the prior output while new argument rendering is documented.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@matdev83
matdev83 marked this pull request as ready for review July 31, 2026 12:01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@connector-support/acp/tool_summary.go`:
- Around line 338-341: Update the truncation logic around rendered in
connector-support/acp/tool_summary.go lines 338-341 to reserve the rune length
of the “… [truncated]” marker before slicing, keeping the complete output within
maxToolArgumentChars. Update connector-support/acp/tool_summary_test.go lines
312-317 to remove the 1,100-rune allowance and assert that the text after
“Arguments: ” is at most maxToolArgumentChars runes.
- Around line 307-312: The formatToolCompletionSummaryWithInput function
currently uses only the nil check to decide whether to include Arguments, which
makes explicit JSON null inputs indistinguishable from absent inputs. Add an
input-presence flag parameter to the function to track whether the rawInput
field was explicitly set, then update the condition around the Arguments append
to check the presence flag rather than just the nil check. When the input field
is present (the flag is true), always render "Arguments:" including the case
where the value itself is null, preserving the JSON null-versus-absent
distinction per the jsonpresence coding guidelines.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b7253d40-918b-4f34-8460-c97a8d9e8510

📥 Commits

Reviewing files that changed from the base of the PR and between 79605bb and d207cb3.

📒 Files selected for processing (2)
  • connector-support/acp/tool_summary.go
  • connector-support/acp/tool_summary_test.go
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*.go

📄 CodeRabbit inference engine (Custom checks)

**/*.go: For server, CLI, worker, or network Go code, ensure context.Context is propagated correctly, cancellation is respected, and new goroutines cannot leak indefinitely.
Do not make accidental public API breaks in Go code: under pkg/** or anywhere exported Go identifiers are changed, warn if the PR changes exported types, function signatures, error behavior, JSON fields, CLI flags, config keys, or documented behavior without clearly explaining the compatibility impact.

**/*.go: Implement and describe Go behavior only; explicitly label Python-era or future behavior.
The core owns orchestration, routing, failover, and B2BUA continuity; provider semantics remain in adapters/plugins.
Core code must not import provider SDKs or concrete plugins.
Use canonical protocol adapters instead of pairwise protocol translators.
Streaming is primary; non-streaming APIs must collect the canonical stream.
Do not transparently retry or fail over after the first downstream content event.
Fail explicitly on capability mismatches; never silently drop required semantics.
Place request and response mutation behind hooks or extensions, not core branching.
Use explicit construction and registration; do not use DI containers, reflection registries, globals, or Go native plugin in v1.
Use specs for new features, breaking or architecture changes, protocol/plugin contract changes, routing semantic changes, or unclear requirements; use direct code for small fixes, documentation, narrow tests, and trivial maintenance.
If an active Kiro spec is in scope, do not code before approved requirements.md and design.md are recorded in spec.json.
Prefer the standard library and add dependencies only when they reduce complexity or risk.
Define small interfaces where consumed; constructors should return concrete types unless exposing stable SDK or plugin contracts.
Every I/O boundary must take context.Context; never store contexts in structs.
Own goroutines, channels, and cancellation ex...

Files:

  • connector-support/acp/tool_summary_test.go
  • connector-support/acp/tool_summary.go

⚙️ CodeRabbit configuration file

**/*.go: Review as production Go code. Prioritize correctness, race conditions, goroutine leaks, context cancellation, timeout handling, error wrapping, nil-pointer risks, resource cleanup, defer placement, API compatibility, interface design, dependency boundaries, and testability. Avoid generic style comments when gofmt/golangci-lint already covers the issue.

Files:

  • connector-support/acp/tool_summary_test.go
  • connector-support/acp/tool_summary.go
**/*

📄 CodeRabbit inference engine (Custom checks)

Do not introduce hardcoded credentials, API keys, tokens, private keys, passwords, production secrets, or sensitive internal URLs.

**/*: Do not add changelog, _Updated, _Reason, timestamp, or history footers to steering or agent instructions.
Use TDD by default: write the test or interface before the implementation.
Prefer the smallest correct diff and avoid speculative abstractions.
Never claim success without direct verification evidence.
Preserve user-authored changes and never use destructive git commands unless explicitly requested.
Do not work on main; create a suitably named local worktree and fix/spec/feat branch based on main for each change.
Use forward-slash git pathspecs on Windows.
Reports must state changed files and verification run, and plainly state skipped tests or uncertainty; mention architectural trade-offs only when relevant.

Files:

  • connector-support/acp/tool_summary_test.go
  • connector-support/acp/tool_summary.go
**/*_test.go

📄 CodeRabbit inference engine (AGENTS.md)

Use focused tests with go test -run TestName ./path/to/pkg; use the project’s prescribed unit, quality, parity, QA, race, and fuzz commands according to change scope.

Files:

  • connector-support/acp/tool_summary_test.go

⚙️ CodeRabbit configuration file

**/*_test.go: Review tests for meaningful assertions, table-driven coverage, race-prone tests, t.Parallel misuse, nondeterminism, leaked goroutines, real network or filesystem dependencies, fragile sleeps, and missing edge cases. Prefer testing observable behavior over implementation details.

Files:

  • connector-support/acp/tool_summary_test.go
connector-support/**

⚙️ CodeRabbit configuration file

connector-support/**: Review shared connector support for secure defaults in process management, TLS, and credential propagation.

Files:

  • connector-support/acp/tool_summary_test.go
  • connector-support/acp/tool_summary.go
🧠 Learnings (1)
📚 Learning: 2026-07-01T22:57:42.953Z
Learnt from: matdev83
Repo: matdev83/go-llm-interactive-proxy PR: 101
File: pkg/lipsdk/scope/context.go:0-0
Timestamp: 2026-07-01T22:57:42.953Z
Learning: In this repository, when defining unexported Go `context` key constants of type `ctxKey int` (e.g., `const ( kFoo ctxKey = iota + N )`), preserve the `iota + <offset>` pattern and keep the existing `<offset>` values rather than simplifying to plain `iota`. These per-package offsets are part of the repo-wide convention to avoid key collisions across packages, and each such constant set should include a short explanatory comment (for example: “offset avoids collision with other packages' context keys”).

Applied to files:

  • connector-support/acp/tool_summary_test.go
  • connector-support/acp/tool_summary.go
🔇 Additional comments (2)
connector-support/acp/tool_summary.go (1)

4-4: LGTM!

Also applies to: 22-22, 95-99, 231-238, 301-305, 323-337

connector-support/acp/tool_summary_test.go (1)

22-22: LGTM!

Also applies to: 55-57

Comment thread connector-support/acp/tool_summary.go Outdated
Comment thread connector-support/acp/tool_summary.go
@matdev83
matdev83 force-pushed the agent/show-acp-tool-arguments branch from d207cb3 to f2a579d Compare July 31, 2026 12:04
@matdev83
matdev83 enabled auto-merge (squash) July 31, 2026 12:05
@matdev83
matdev83 merged commit 11c7c6d into main Jul 31, 2026
20 checks passed
@matdev83
matdev83 deleted the agent/show-acp-tool-arguments branch July 31, 2026 12:23
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