Skip to content

perf(agents): bound autonomous sessions and reply overhead - #6692

Closed
malkovitc wants to merge 3 commits into
block:mainfrom
malkovitc:feat/agent-efficiency-current
Closed

malkovitc wants to merge 3 commits into
block:mainfrom
malkovitc:feat/agent-efficiency-current

Conversation

@malkovitc

Copy link
Copy Markdown

Summary

  • reduce default ACP conversation context from 12 messages to 6 and proactively rotate sessions after 8 turns
  • disable Codex app/plugin injection for autonomous managed agents and start bypass-permission Codex sessions directly in full-access mode
  • reduce prompt-driven ceremony and duplicate validation; let buzz messages send --reply-to infer Forum comment kind from its parent

Production canary

Linza managed-agent [QUESTION] canary after refreshing the 1.4.0 Codex ACP adapter:

  • exact response, no duplicate publication
  • 26 seconds end-to-end
  • 2 model calls
  • 1 tool call (final Buzz publication)
  • 44,006 cumulative tokens, 32,256 cached input tokens
  • historical unbounded baseline: 112 seconds, 10 model calls, 325.7k processed tokens

Validation

  • cargo fmt --all -- --check
  • cargo test -p buzz-acp -p buzz-cli — 802 ACP tests passed before one load-sensitive keepalive timing test failed while the host was compiling; isolated retry passed after load settled
  • cargo test -p buzz-acp acp::tests::keepalive_resets_idle_past_deadline -- --exact
  • cargo clippy -p buzz-acp -p buzz-cli -- -D warnings
  • pnpm --dir desktop typecheck
  • desktop test suite: 5,397 passed
  • git diff --check origin/main...HEAD

The keepalive test was also run on unmodified origin/main; it is timing-sensitive to host load and passed there without source differences in acp.rs.

@malkovitc
malkovitc requested a review from a team as a code owner August 24, 2026 14:24
@malkovitc

Copy link
Copy Markdown
Author

Final packaged-runtime evidence: combined current-main build e4ab80873 was installed as Buzz Linza Patched 0.5.18. All 13 production Linza agents started with context=6, max turns=8, full-access initial mode, apps/plugins/remote_plugin disabled, and no stale adapter nudge. A fresh Caliper [QUESTION] canary completed in 18s with exactly one published reply, 2 model calls, 1 Buzz publication tool call, and 43,999 cumulative tokens (32,256 cached). The historical baseline was 112s / 10 model calls / 325.7k processed tokens.

@malkovitc

Copy link
Copy Markdown
Author

Follow-up production finding and fix (1b9e0bf90): a Conductor Kanban status request previously consumed 361,430 cumulative tokens across 11 model calls / 10 tool calls in 157s and published an empty reply. Root causes were repeated full-board MCP downloads (including a 31k-token tool payload), waits/retries, and --content - with no stdin. The CLI now rejects blank message bodies (while preserving attachment-only messages), with regression tests. Operationally, Kanban reads now use one compact cached filtered command and safe piped publication. Final same-question canary: correct non-empty single reply in 29s, 3 model calls, 2 tool calls, 68,056 cumulative tokens (53,504 cached; 13,808 fresh input): ~81% fewer processed tokens and ~58% less fresh input.

@Chessing234 Chessing234 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.

this silently flips max_turns_per_session from 0 (disabled) to 8 and cuts context 12→6. that's a product default change, not just a bound — please call it out or leave the defaults and make the cap opt-in.

Signed-off-by: evgeniy.chernomortsev <j.malkovitc@gmail.com>
Signed-off-by: evgeniy.chernomortsev <j.malkovitc@gmail.com>
Signed-off-by: evgeniy.chernomortsev <j.malkovitc@gmail.com>
@malkovitc
malkovitc force-pushed the feat/agent-efficiency-current branch from 1b9e0bf to 9b5716c Compare August 25, 2026 08:44
@malkovitc

Copy link
Copy Markdown
Author

Closing: these agent-efficiency changes are part of our internal downstream Buzz customization and will be maintained in our fork rather than submitted upstream.

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