feat(attach): pass --resume on dashboard re-attach
test / unit (pull_request) Successful in 17s
test / integration (pull_request) Successful in 1m7s

Re-entering a running bottle from the dashboard (Enter on the
agents pane) now invokes claude with `--resume` so the session
picks up the prior conversation history rather than starting a
fresh transcript. The first-attach paths (`./cli.py start` and
the dashboard's new-agent `n` flow) leave it off — the
transcript doesn't exist yet there.

`attach_claude` gains a `resume: bool = False` kwarg;
`_attach_to_bottle` in the dashboard passes `True`.
This commit is contained in:
2026-05-26 03:52:12 -04:00
parent fc8be2e418
commit df559e43be
2 changed files with 19 additions and 6 deletions
+7 -2
View File
@@ -656,10 +656,15 @@ def _attach_to_bottle(
slug: str,
) -> str:
"""Handoff: curses.endwin → attach claude → curses refresh.
Returns the post-attach status-line message."""
Re-entry into a running bottle from the dashboard always
passes `--resume` so claude picks up its prior conversation
rather than starting a fresh transcript — the first attach
happens via `_new_agent_flow` which sets up the transcript
in the first place. Returns the post-attach status-line
message."""
curses.endwin()
try:
exit_code = attach_claude(bottle, remote_control=False)
exit_code = attach_claude(bottle, remote_control=False, resume=True)
except BaseException:
stdscr.refresh()
raise