Skip to content

Bound coding-agent LLM history at compaction - #51

Open
Stephen Belanger (Qard) wants to merge 6 commits into
mainfrom
optimize-llm-message-inputs
Open

Bound coding-agent LLM history at compaction#51
Stephen Belanger (Qard) wants to merge 6 commits into
mainfrom
optimize-llm-message-inputs

Conversation

@Qard

Copy link
Copy Markdown
Collaborator

Summary

  • reset Claude LLM message history at PostCompact, placing the compact summary first and retaining only messages named by compactMetadata.preservedMessages.uuids
  • reset Codex history at each ordered compacted checkpoint, placing the compaction item first, followed by the remaining native replacement_history and later messages
  • use Pi session_compact to establish the active compaction summary while preserving Pi’s native compaction-aware context order; avoid copying raw pre-compaction message arrays onto compaction task spans
  • keep Claude transcript import from treating synthetic compact summaries as new user turns
  • ensure a Codex tool call is recorded as LLM output before it becomes history for the following LLM call

Validation

  • cargo test --manifest-path bt-daemon/Cargo.toml --all-features
  • cargo clippy --manifest-path bt-daemon/Cargo.toml --all-features --all-targets -- -D warnings
  • make test

The capture adapters already forward Claude PostCompact and Pi session_compact, so this is a daemon-only change and does not require plugin package changes.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T18:41:04.637039Z 1db558e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1db558e306

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread bt-daemon/src/translate/codex.rs Outdated
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