bug(store): a headless worker that dies before RUNNING leaves the session PENDING forever; its stderr is lost

Open
#271 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start with _reap_dead in tether/store.py and trace how worker processes and session status are recorded. Check the existing tests for reaping dead workers, then add coverage for a PENDING session whose stored pid has exited and for preserving worker stderr in a log file. Done means dead PENDING sessions become FAILED with a useful error pointing to the captured stderr.

Written by the indexing model from the issue text.

Description

What happened

tether run --headless (model claude-softmedium/opus) stored pid 3540688 and status PENDING. The worker process died without ever setting RUNNING. tether wait --timeout 3600 blocked the full hour; the session is still PENDING with 0 steps (session ses_e6c13419). The worker's stdout/stderr go nowhere, so the cause cannot be found.

Expected

  • _reap_dead also reaps PENDING sessions whose stored pid is gone (FAILED, Worker died (pid N) before starting).
  • The worker's stderr goes to a file (e.g. .tether/workers/<id>.log), and the FAILED result points to it.

Notes

tether/store.py _reap_dead only checks rec.status == "RUNNING".

Found in the v0.2.18 real-world test (tether + Haiku / qwen3.5:9b as gru minions building 11 features; log .claude/gru/active/real-world-v0218.md).

north star: 45/68 (v0.2.18) -> not measured; reliability floor (#171)

Dominant language
Python
Stars
3
Forks
1
Avg merge
52m
Merged PRs (30d)
166

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from igormcsouza/tether

All issues in igormcsouza/tether

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.