Skip to content

fix(roadmap): a tool answer cut at the character limit has no notice #4341

Closed

Description

@dan-petty

Problem

A tool answer of the stage planner that passes the limit of 8,000 characters is cut in the middle of a line, with no notice. cut in src/devops_cli/roadmap/refine/refine_investigation.py adds the notice (more lines are left out) only when the line limit (240) dropped a line. The character limit drops text with no notice. The model then reads a partial answer as a whole one and guesses the lines it did not see.

Evidence: a live stage run of #3387 on 2026-11-10 with deepseek-v4.1-flash-1017 and the trace of its plan run (58 requests, 79 tool calls):

  • 17 of 79 answers reached the character limit. In 11 of them the answer is exactly 8,000 characters, so the cut gave no notice. Examples: file_symbols of src/devops_cli/roadmap/stage/stage.py (2,926 lines) gave 8,000 characters, read_file of lines 100 to 150 of docs/ROADMAP_WORKFLOW.md gave 8,000 characters for 51 lines, and read_file of docs/roadmap/stage.md lines 1 to 70 gave 8,000 characters.
  • The model read stage.py 9 times with guessed ranges (560-740, 1700-1900, 1859-2010, 2110-2420, 2296-2560, 2583-2740, 1438-1580, 959-1070, 2010-2110) after file_symbols showed it only the start of the file.
  • The answers are 337,000 characters, about 105,000 of the 190,000 tokens of the last request.

Expected

  • An answer that the character limit shortens ends at a whole line and carries the notice (more lines are left out), as an answer that the line limit shortens does.
  • A line that is longer than the limit alone is cut and marked.

Acceptance criteria

  • A test with 100 lines of 100 characters shows that cut ends with the notice and holds no partial line. It fails today.
  • A test shows that an answer under both limits has no notice.
  • devops roadmap eval stage --replay keeps its result (81 of 317 defects caught, 0 missed, 5 of 5 good plans accepted).

Existing tool considered

None: cut is a 5-line function of the project. The change edits it. Cost: about 15,000 tokens to build, 2,000 to keep, 1 hour.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The bug degrades model output quality in 17 of 79 live tool calls but does not crash the pipeline.
    • Value: Medium. The model guesses unseen lines, which lowers plan quality but the run still completes.
    • Effort: Low. The cut function is 5 lines and the change adds one notice branch plus two tests.
    • Related: feat(roadmap): Tune stage planner caps from run data #3241, which asks for a different change. Both deal with tool answer caps in the stage planner, but 3241 tunes the cap values while the candidate adds a truncation notice in the cut function.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 10, 2026
  4. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Correction of the evidence in the description: the file_symbols answer for src/devops_cli/roadmap/stage/stage.py was 8,000 characters, but it lists 159 of 162 symbols, so it lost only 3. It is not the cause of the nine reads of stage.py in that run. The claim that the cut made the model guess its line ranges is not shown. What the trace does show: 11 of 79 answers were cut to exactly 8,000 characters with no notice, and read_file of 51 lines of docs/ROADMAP_WORKFLOW.md was one of them. The model could not know that it had read less than it asked for. The pull request and its change folder state this.

  5. removed
    status/in-review
    owner/agent
    on Nov 10, 2026
  6. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor
  7. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-10 07:20 UTC

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

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions