Skip to content

bug(platform): a resumed Claude Code task conversation keeps its old instructions #5135

Closed

Description

@yannickmonney

Problem

A task run that resumes an earlier Claude Code conversation works from the agent and project instructions that conversation recorded when it started (or last compacted), not from the instructions as they stand now. A change to an agent's or a project's instructions therefore reaches a resumed claude-code conversation only at its next compaction. Standing role tasks are hit hardest: each keeps one conversation, kicked every 15–30 minutes and compacting about every 4 hours, so a role can follow superseded instructions for hours.

Evidence (v0.5.94, claude-code harness)

  • The Reviewer's standing role task "Review and land 3 of 3" has kept one conversation since 2026-10-29 17:40 UTC. Its transcript holds the instructions as an instructions attachment only at the conversation's start and after each compaction (the last at 2026-10-30 09:42 UTC).
  • The agent's and the project's instructions changed at 2026-10-30 10:35 UTC.
  • The next run's exec (10:40 UTC) was launched with --resume and with the new text in its --append-system-prompt argument, but the conversation got no new instructions attachment.
  • In that run, the agent followed the old text and said so on the task it reviewed: "the instructions I was handed this run still forbid deleting a branch I didn't create". The new text asked it to delete that branch.

Cause

resumeKeepsRecordedInstructions() (services/platform/backend/core/tasks/agent_run_host.ts) is true only for a harness whose instructions slot names a configKey (Codex). So resumedTurnPrompt() opens a resumed claude-code turn with the execution update alone. Its comment assumes the other harnesses take their instructions through "a channel of their own" on every exec. For the pinned Claude Code, that channel (--append-system-prompt, configs/platform/system/harnesses/claude-code/harness.yml) is also only rendered into the conversation at its start and after compaction.

Done means

  • A resumed claude-code turn carries the instructions as they stand now. This can be the existing "Tale instructions update" restatement, or a fresh conversation when the digests in the run's instructions_snapshot differ from those the conversation last received.
  • A regression test fails before the fix: a resumed claude-code turn after an agent-instructions change must carry the new text.
  • The harness facts state which harnesses keep their recorded instructions on resume, so a new harness or CLI pin is classified explicitly.

Activity

  1. added
    agent-ready
    on Oct 30, 2026
  2. added a commit that references this issue on Oct 30, 2026
    07c50d1
  3. added a commit that references this issue on Oct 30, 2026
    0016b75
  4. added a commit that references this issue on Oct 30, 2026
    2c1c686
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

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions