Skip to content

fix(kilocode): link compaction helper calls - #5308

Merged
giuliolovisotto merged 3 commits into
mainfrom
codex/fea-518-kilocode
Nov 4, 2026
Merged

giuliolovisotto merged 3 commits into
mainfrom
codex/fea-518-kilocode

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Kilo emits compaction events, but its captured helper calls lack the assistant-message correlation needed to resolve those events. Reuse Gym's existing OpenCode assistant-message header plugin in Kilo's task-environment hooks, declare the captured header, and scope compaction observations to the configured model server. Use matching source-path and destination-filename constants for bundled plugins and installers in both OpenCode and Kilo. Kilo explicitly imports the shared OpenCode correlation hook; existing filenames and runtime behavior are preserved. The collector can then retain the helper and exclude it from policy turns using the existing join.

Validation

The constants cleanup passed 481 OpenCode/Kilo tests (12 skipped), all-file pre-commit, and fresh compaction runs on both pinned runtimes. Each run retained 16 model calls and 15 policy turns, reused the summary, and retained helper usage.

Earlier validation:

python -m pytest -q scripts/harness_conformance/tests tests/unit_tests/harness_capabilities responses_api_agents/kilocode_agent/tests --disable-warnings: 658 passed, 9 skipped on the assembled stack. Plugin-staging tests exercise the reused module. Fresh sandbox tests: 60 passed; fresh assembled-stack shared/Kilo/collector run: 1,194 passed, 9 skipped, 73 deselected. The fresh Kilo compaction run still passes with 16 calls and 15 turns.

Rollouts

With Kilo 7.4.15 and the final shared scenario, python scripts/run_harness_conformance.py --harness kilocode --scenario context_compaction --gate-tier P1 --output results/kilocode-compaction passes: 16 captured calls, 15 policy turns, one compaction event; the summary is reused and helper usage retained.

The eight pre-existing scenarios pass 7/8. model_error still raises an execution error instead of returning a failed response. The same failure and failed checks reproduce on the shared-support branch before any Kilo changes; it is not introduced by this PR.

Compatibility and benchmark impact

The added header carries correlation metadata. Kilo's execution and compaction policy are unchanged. Production artifacts gain resolvable helper references; no benchmark configuration changes. The shared module is existing Apache-2.0 Gym code.

The stack starts with #5122; #5439 registers the scenario only after the shared support and harness fixes.

All-file uvx pre-commit run --all-files passed; all commits have DCO sign-off. Full repository CI has not been validated. Smoke runs use real pinned harness runtimes and a controlled local model provider; they do not qualify remote sandbox infrastructure or model quality.

Rebase validation — 2026-11-02

Rebased onto main 0c7ac5119c99e0aa0dfeda7be59157c589680ffd, preserving the existing stack order. The assembled original stack passed 1,719 shared conformance, collector, Codex and Kilo tests (16 skipped, 76 configuration-test cases deselected). Fresh Kilo compaction passes all five behavioral checks: 16 calls, 15 turns, one event and retained helper usage. All-file pre-commit passed on both stack tips; commits have DCO sign-off and SSH signatures. These are local pinned-runtime runs with a controlled provider, not remote deployment or full repository CI qualification.

@giuliolovisotto giuliolovisotto added bug Something isn't working area:agent Agent harnesses and Responses API agent behavior needs-review PR is ready for code review and waiting on a reviewer labels Oct 29, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team October 29, 2026 13:44
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 30, 2026
marta-sd
marta-sd previously approved these changes Nov 3, 2026
@giuliolovisotto
giuliolovisotto added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to invalid changes in the merge commit Nov 4, 2026
@giuliolovisotto
giuliolovisotto added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to invalid changes in the merge commit Nov 4, 2026
Base automatically changed from codex/fea-518-compaction-checks to main November 4, 2026 08:31
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 4, 2026 08:37
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41802880941

This branch was previously deployed

1 inactive deployment
public — c07b65c6 Deployed Nov 4, 2026 by copy-pr-bot[bot] via release / finalize / notify #9921
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants