Skip to content

fix: stop rerunning AI prompt when task workspace is restarted #20225

Closed

Description

@david-fraley

Description

Customers have identified that with a Task Workspace, when it is restarted or started up after being shut down, the original prompt will rerun. The prompt rerunning can cause unexpected behaviour in

  • Increase in billing as you're unnecessarily calling AI tooling
  • The agent ignoring previously made progress, potentially overwriting work

On restart, Tasks shouldn't rerun the prompt. See Slack for the original issue.

Activity

  1. changed the title [-]feat: stop rerunning AI prompt when task workspace is restarted[/-] [+]fix: stop rerunning AI prompt when task workspace is restarted[/+] on Oct 9, 2025
  2. johnstcn commented on Oct 14, 2025

    @johnstcn
    Member

    Discussed in yesterday's standup: as an interim workaround, we're going to add a warning message when restarting a task workspace or starting from a stopped state.

    @david-fraley question regarding the desired behaviour:

    • Should no prompt ever be run when restarting a task workspace?
    • Should users alternatively be able to specify a "continuation" prompt?
  3. BrunoQuaresma commented on Oct 14, 2025

    @BrunoQuaresma
    Contributor

    Any thoughts on what the warning message should be?

  4. BrunoQuaresma commented on Oct 14, 2025

    @BrunoQuaresma
    Contributor

    Should users alternatively be able to specify a “continuation” prompt?

    @cian since we do not save chat history or context, how would that work? A continuation prompt would be interpreted by the agent as a brand-new prompt 🤔.

  5. johnstcn commented on Oct 15, 2025

    @johnstcn
    Member

    Should users alternatively be able to specify a “continuation” prompt?

    @cian since we do not save chat history or context, how would that work? A continuation prompt would be interpreted by the agent as a brand-new prompt 🤔.

    That's exactly my point -- we would need the agent to support resuming the previous session in order for a 'continuation prompt' to work. We currently leave it up to the workspace to store the chat history and context.

  6. BrunoQuaresma commented on Oct 15, 2025

    @BrunoQuaresma
    Contributor

    The scope of this issue isn’t very clear, so I’m moving it to Blocked until we figure this out.

  7. removed their assignment
    on Oct 15, 2025
  8. BrunoQuaresma commented on Oct 15, 2025

    @BrunoQuaresma
    Contributor

    As decided on Slack, this will be fixed once modules are enabled to resume the task.

  9. DevelopmentCats commented on Oct 22, 2025

    @DevelopmentCats
    Contributor

    This has been resolved for the claude code module in v3.2.2 only but the other modules will soon follow

    coder/registry#496

  10. bpmct commented on Oct 22, 2025

    @bpmct
    Member

    @DevelopmentCats can you also ensure this is fixed in our dogfood template (i think its version controlled in this repo) and our triage template?

  11. DevelopmentCats commented on Oct 22, 2025

    @DevelopmentCats
    Contributor

    @bpmct I have a PR open to bump this #20422

    Ill make sure its updated in the triage template as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions