Skip to content

feat(acp): subagent IDE visibility via parent_tool_use_id, terminal streaming, and ToolCallLocation#1014

Merged
bug-ops merged 3 commits intomainfrom
worktree-zeph-acp-subagents
Feb 27, 2026
Merged

feat(acp): subagent IDE visibility via parent_tool_use_id, terminal streaming, and ToolCallLocation#1014
bug-ops merged 3 commits intomainfrom
worktree-zeph-acp-subagents

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 27, 2026

Closes #1007, #1008, #1009, #1010.

Summary

Implements three ACP protocol extensions that make subagent activity visible in IDE clients (Zed, VS Code ACP extension), bringing Zeph to parity with the zed-industries/claude-agent-acp reference.

Changes

Crate Files Change
zeph-acp agent.rs, fs.rs, terminal.rs parent_tool_use_id injection, AcpFileExecutor locations, stream_until_exit
zeph-core channel.rs, agent/mod.rs, agent/builder.rs, agent/tool_execution.rs LoopbackEvent fields, Channel::send_tool_output signature, Agent builder
zeph-tools executor.rs + 6 implementors ToolOutput.locations field
zeph-channels, zeph-tui, root any.rs, channel.rs Channel implementor updates

Test plan

  • cargo +nightly fmt --check — pass
  • cargo clippy --workspace -- -D warnings — pass (0 warnings)
  • cargo nextest run --workspace --lib --bins — 2950 passed, 11 skipped
  • New tests: loopback_tool_start/output_parent_tool_use_id_injected_into_meta, streaming_mode_emits_terminal_exit_notification, read/write_file_returns_location, handle_tool_result_locations_propagated_to_loopback_event

…treaming, and ToolCallLocation

Closes #1007. Implements three ACP protocol extensions that make subagent
activity visible in IDE clients (Zed, VS Code ACP extension).

parent_tool_use_id propagation (#1008):
- Add parent_tool_use_id to LoopbackEvent::ToolStart/ToolOutput in channel.rs
- Add with_parent_tool_use_id() builder on Agent<C> and AgentBuilder
- tool_execution.rs passes parent_tool_use_id through all send_tool_start/
  send_tool_output call sites
- loopback_event_to_updates injects _meta.claudeCode.parentToolUseId into
  ACP ToolCall and ToolCallUpdate notifications; null for top-level agent,
  UUID for subagents
- All Channel implementors (AnyChannel, AppChannel, TuiChannel) updated

Terminal streaming (#1009):
- AcpShellExecutor::execute_in_terminal refactored to use stream_until_exit
  helper that polls output every 200ms via tokio::select!
- Emits ToolCallUpdate with _meta.terminal_output per chunk during execution
- Emits ToolCallUpdate with _meta.terminal_exit on completion
- UTF-8 safety: byte-offset slice replaced with str::get() + unwrap_or("")

ToolCallLocation (#1010):
- Add locations: Option<Vec<String>> to ToolOutput in zeph-tools
- AcpFileExecutor populates locations with absolute file path for read_file
  and write_file branches
- Channel::send_tool_output trait extended with locations parameter;
  LoopbackChannel forwards it instead of hardcoding None
- tool_execution.rs extracts out.locations and passes through at all 3 call
  sites; loopback_event_to_updates forwards to ToolCall.location

Tests added: loopback_tool_start/output_parent_tool_use_id_injected_into_meta,
streaming_mode_emits_terminal_exit_notification, read/write_file_returns_location,
handle_tool_result_locations_propagated_to_loopback_event (2950 pass total)

Documentation: README.md, crates/zeph-acp/README.md, docs/src/advanced/acp.md
updated with wire protocol details and IDE setup guidance.
@bug-ops bug-ops enabled auto-merge (squash) February 27, 2026 03:06
@bug-ops bug-ops merged commit 11c024f into main Feb 27, 2026
28 checks passed
@bug-ops bug-ops deleted the worktree-zeph-acp-subagents branch February 27, 2026 03:19
bug-ops added a commit that referenced this pull request Feb 27, 2026
Add docs/src/guides/ide-integration.md covering ACP stdio setup, Zed and
VS Code configuration, and the three subagent visibility features from
PR #1014: subagent nesting via parent_tool_use_id, live terminal streaming
via AcpShellExecutor, and agent following via ToolCallLocation.

Update docs/src/SUMMARY.md and CHANGELOG.md.

Closes #1011
bug-ops added a commit that referenced this pull request Feb 27, 2026
Add docs/src/guides/ide-integration.md covering ACP stdio setup, Zed and
VS Code configuration, and the three subagent visibility features from
PR #1014: subagent nesting via parent_tool_use_id, live terminal streaming
via AcpShellExecutor, and agent following via ToolCallLocation.

Update docs/src/SUMMARY.md and CHANGELOG.md.

Closes #1011
bug-ops added a commit that referenced this pull request Feb 27, 2026
…#1015)

Add docs/src/guides/ide-integration.md covering ACP stdio setup, Zed and
VS Code configuration, and the three subagent visibility features from
PR #1014: subagent nesting via parent_tool_use_id, live terminal streaming
via AcpShellExecutor, and agent following via ToolCallLocation.

Update docs/src/SUMMARY.md and CHANGELOG.md.

Closes #1011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channels User interface channels core documentation Improvements or additions to documentation enhancement New feature or request rust size/XL tests

Projects

None yet

1 participant