Skip to content

feat(#591 followup): concurrent same-team-name STATE_FILE namespace #599

@michael-wojcik

Description

@michael-wojcik

Surfaced during PR #596 blind review (architect-F3).

Problem: STATE_FILE path is ~/.claude/teams/{team_name}/inbox-wake-state.json. Concurrent sessions on the same project that share a team_name (rare, but possible via pause/resume deserialization) would share the STATE_FILE, creating a race condition.

Practical reachability: most concrete failure shape is pause→resume, which is sequential not concurrent. The α₂ atomic-rename design handles this cleanly (new session writes STATE_FILE → atomic-rename replaces old; old monitor_task_id ignored). Truly concurrent same-team-name requires the user to manually orchestrate it — rare.

Why deferred: existing α₂ design handles the practical case. Truly concurrent edge would require adding session-id namespace to STATE_FILE path, which touches every callsite (cron prompt body, Monitor block, teardown, runbook) for an edge that's hard to reach.

Suggested fix scope: add session_id to placeholder convention; STATE_FILE path becomes ~/.claude/teams/{team_name}/inbox-wake-state-{session_id}.json. Substantial design change.

Originating review: docs/review/591-blind-architect.md F3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions