Skip to content

Session start takes four sequential calls, and the server instructions forbid batching them #34

Closed

Description

@bigfree

The documented session start is four tool calls in a row: get_instructions, get_summary, get_project_map, and get_plan (the plan is mentioned in get_plan's description). The server instructions add "Do NOT batch tool calls", so a client that would run them in parallel is told not to. Each call is a model turn before the agent can answer anything.

Measured over a real stdio session (bytes include the server instructions=):

Project Calls Bytes
fresh pjm init 4 18,576
two months old, ~3k events 4 44,166

On the older project more than a third of that is the project map and the parts of the plan that are not current (Ideas, Someday / maybe, Shipped), which most sessions do not need.

What I'd suggest: one read tool, start_session(), that returns what a session needs to begin:

  • the rules (AI_INSTRUCTIONS.md), the summary, and the plan without Ideas, Someday / maybe and Shipped (any other section is kept);
  • the project map only while it is still the init placeholder, so Setup Mode stays detectable; otherwise a one-line pointer to get_project_map();
  • a first line saying the old start calls are satisfied, because existing AI_INSTRUCTIONS.md files still list them and agents would otherwise call them anyway.

The server instructions, the CLAUDE.md bridge and the tool descriptions then name start_session(), and "Do NOT batch tool calls" becomes "independent projectmem calls may run in parallel". The existing read tools stay as they are.

Project Calls Bytes
fresh pjm init 1 18,088
two months old, ~3k events 1 36,652 (−17%)

I did not raise INSTRUCTIONS_VERSION: as I read refresh_ai_instructions, that rewrites every project's AI_INSTRUCTIONS.md on the next pjm init (with a .bak), including hand-edited ones.

A working version is on bigfree:feat/start-session (one commit on top of main, diff), with tests, and test_the_three_surfaces_agree_about_the_session_start_order now checks that all three surfaces name start_session(). Since this changes the public guidance, I'd rather hear which shape you prefer before opening a PR.

Open questions:

  • A new tool, or should get_summary() itself return the rules and the current plan?
  • Would MCP server instructions= be a better place for the condensed rules, so the start needs no rules call at all?
  • Should the plan in the start response be cut to the current sections, or returned whole?
  • Is it worth raising INSTRUCTIONS_VERSION so new guidance reaches existing projects, given that it overwrites edited files?

Activity

  1. riponcm commented on Nov 20, 2026

    @riponcm
    Owner

    Shipped in 0.3.6 as start_session(), thank you. It returns the rules, the summary and the current plan without Ideas, Someday / maybe and Shipped. It includes the project map only while it's still the placeholder. The server instructions and the bridge name it, and parallel calls are allowed.

    I kept INSTRUCTIONS_VERSION unchanged, for the reason you gave, so hand-edited AI_INSTRUCTIONS.md files are left alone. Its first line covers the older start calls. Moving the rules into instructions= can wait. Closing.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions