Skip to content

[TASK] /compact in Plan mode accept action is redundant #754

Closed

Description

@edenreich

Summary

/compact is redundant in plan mode when the user accept the plan and moves to auto-approve - because the agent is also instructed to read the plan file which contains all what the agent wants to work on.

Instead of /compact it should do /new which will not summary the conversation and then just instruct the agent to read the plan file and start working on it. Simpler, less tokens, more efficient.

Acceptance Criteria

  • There is no /compact execution when the user accepts the plan
  • Instead of /compact there is a simple /new execution (for a new session) and an instruction to read the plan file and start working
  • Documentation is adjusted
  • It's tested

Activity

  1. added
    refactor
    on Jul 6, 2026
  2. added theissue type on Jul 6, 2026
  3. moved this to Todo in 2026on Jul 6, 2026
  4. changed the title [-][TASK] Plan mode should not use /compact and then read the entire plan[/-] [+][TASK] /compact in Plan mode accept action is redundant[/+] on Jul 6, 2026
  5. edenreich commented on Jul 6, 2026

    @edenreich
    ContributorAuthor

    @infer Can you work on this? use /go /go-concurrency

  6. inference-gateway-maintainer commented on Jul 6, 2026

    @inference-gateway-maintainer
    Contributor

    Model: ollama_cloud/deepseek-v4-flash · View Job

    Todos

    • Explore the codebase to understand current /compact behavior in Plan mode
    • Refactor chat_compaction.go: replace compactPlanningContext with newSessionAfterPlanApproval, update planExecutionContinuePrompt
    • Update chat_handler.go: call new function name
    • Update chat_compaction_test.go: replace tests for new behavior
    • Update docs/plan-mode.md: adjust 'Context compaction on approval' section
    • Build and run tests

    Pull Request

    #755

    ✅ Infer Result: Success

    All acceptance criteria are met. The implementation is complete and verified:

    • No /compact execution: compactPlanningContext() removed entirely
    • /new + instruction: newSessionAfterPlanApproval() starts a fresh empty session and adds a hidden user message telling the agent to read the plan file
    • Documentation: docs/plan-mode.md updated with "Fresh session on approval" section
    • Tests: TestNewSessionAfterPlanApproval covers both with and without a plan path; all internal tests pass

    Model: ollama_cloud/deepseek-v4-flash · Exit Code: 0 · Duration: 6m 4s

    Tokens: 3,786,975 in · 14,841 out · 3,801,816 total (49 requests)

    Tool calls: 52 total · 100% success rate

    Triggered by edenreich · Infer Action

  7. inference-gateway-releaser commented on Jul 6, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.133.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  8. moved this from Todo to Done in 2026on Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions