Skip to content

Conversation

@CSRessel
Copy link
Collaborator

@CSRessel CSRessel commented Jan 2, 2026

Summary

🤖 Generated with Nori

  • Add debugging feature to capture JSON-RPC 2.0 traffic between Nori client and ACP agents using sacp-tee proxy
  • Enable via --acp-trace CLI flag or acp.trace_enabled = true in config.toml
  • Generate session-specific log files at {codex_home}/log/acp-trace-{timestamp}-{pid}.log

Test Plan

  • 8 unit tests added covering config loading, CLI overrides, and command wrapping
  • All existing tests pass (117 tests in codex-acp)
  • Manual testing with sacp-tee installed and --acp-trace flag

Files Changed

  • acp/src/connection.rs - AcpTraceConfig struct and build_agent_command()
  • acp/src/backend.rs - trace_config field in AcpBackendConfig
  • core/src/config/mod.rs - acp_trace_enabled in Config, ConfigOverrides
  • tui/src/cli.rs - --acp-trace CLI flag
  • tui/src/chatwidget/agent.rs - trace config construction
  • acp/tests/acp_trace_test.rs - new test file

Share Nori with your team: https://www.npmjs.com/package/nori-ai

CSRessel and others added 3 commits January 2, 2026 15:23
Add a debugging feature to capture all JSON-RPC 2.0 traffic between the
Nori client and ACP agents using the sacp-tee proxy from symposium-acp.

When enabled via --acp-trace CLI flag or acp.trace_enabled in config.toml,
the agent subprocess command is wrapped with:
  sacp-tee --log-file <path> -- <original-command> <args>

Key changes:
- Add AcpTraceConfig struct and build_agent_command() in connection.rs
- Add trace_config field to AcpBackendConfig in backend.rs
- Add acp_trace_enabled field to Config, AcpConfigToml, ConfigOverrides
- Add --acp-trace CLI flag to TUI
- Generate session-specific log files: {codex_home}/log/acp-trace-{ts}-{pid}.log
- Add 8 tests covering config, CLI override, and command wrapping
- Update docs.md files for acp, core, and tui modules

Config priority: CLI override > TOML config > default (false)
🤖 Generated with [Nori](https://nori.ai)

Co-Authored-By: Nori <contact@tilework.tech>
Fix clippy::uninlined_format_args warnings in:
- acp/src/config/types.rs: acp_trace_log_path format string
- acp/src/connection.rs: spawn error message format string
🤖 Generated with [Nori](https://nori.ai)

Co-Authored-By: Nori <contact@tilework.tech>
Resolved conflicts by preserving both feature sets:
- ACP traffic tracing (current branch via sacp-tee proxy)
- Message history persistence (dev branch)

Changes:
- Added both trace_config and nori_home/history_persistence fields to AcpBackendConfig
- Added both acp_trace_enabled and history_persistence to config types
- Preserved enhanced error handling from dev in connection spawning
- Added environment variable support (.envs) to subprocess spawning
- Merged documentation for both features in tui/docs.md

Both features are independent and now work together:
- Trace config enables debugging of ACP JSON-RPC traffic
- History persistence enables message history storage and navigation
🤖 Generated with [Nori](https://nori.ai)

Co-Authored-By: Nori <contact@tilework.tech>
@CSRessel CSRessel force-pushed the feature/acp-sacp-tee-tracing branch from 0dc3e3e to cb18831 Compare January 14, 2026 19:35
CSRessel and others added 6 commits January 14, 2026 17:24
Make ACP traffic tracing available only in debug builds to prevent
accidental exposure of traffic logs in production while maintaining
zero runtime overhead.

Implementation uses a boundary-only approach with conditional compilation
guards at exactly two points:
- CLI flag visibility (--acp-trace only exists in debug builds)
- Command spawn (build_agent_command ignores trace config in release)

Config fields flow through all intermediate code unchanged, keeping the
implementation simple while ensuring security.
🤖 Generated with [Nori](https://nori.ai)

Co-Authored-By: Nori <contact@tilework.tech>
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.

2 participants