Skip to content

session: tasks stuck in working on restart, stopped status mapped to failed, and reader handoff #1554

Description

@santoshkumarradha

Summary

Task frontier state recovery leaves queued tasks hung after restart, stopped tasks are improperly reported as failures, and chat reader subtasks do not fall back cleanly.

Items & Observed Behavior

  1. Tasks hung in working state across restart: A task queued or waiting on machine capacity remains in working status in the database after codeaf engine --stop and restart, but is never re-admitted to the execution frontier.
  2. Stopped tasks mapped to failure: Cancelling a task via x or /stop sets the crew line to failed and outputs /redo stronger... instead of marking it cleanly as stopped.
  3. Chat reader subtask handoff failure: When an inline chat reader subtask fails to hand off, it prints ◆ reading for the chat · stopped and leaves a stopped card in the chat before running inline.

Expected Behavior

  • Engine startup must reconcile persisted task state and re-queue uncompleted tasks onto the frontier.
  • Explicit cancellation (x, /stop) must record status as stopped and omit retry suggestions.
  • Reader subtask handoff failures should fall back to inline reading without polluting the chat stream with stopped task cards.

Root Cause / Location

  • internal/session/cancel.go and internal/session/task_frontier.go: Startup frontier reconciliation and cancellation status mapping.
  • internal/session/read_handoff.go: Silent fallback handling when subtask delegation cannot be completed.

—
Drafted with CodeAF · reviewed and owned by the author

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Labels

area:sessionThe engine — turns, tasks, the toolbelt, checkpointsbugSomething the code does that it should notsev:seriousWrong or missing behaviour a person meets in ordinary use

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions