Skip to content

Crush: carry on its own conversation with --session - #52

Merged
splashxmoon merged 1 commit into
splashxmoon:mainfrom
SeoJunLee-code:crush-session-id
Nov 29, 2026
Merged

splashxmoon merged 1 commit into
splashxmoon:mainfrom
SeoJunLee-code:crush-session-id

Conversation

@SeoJunLee-code

Copy link
Copy Markdown
Contributor

What this changes

Follow-up to #46. Two Friday sessions running Crush in the same folder no longer cross over: each keeps its own conversation. Before, the next turn used --continue, which picks up the newest conversation in the folder.

Crush now runs with --verbose, whose stderr log names the conversation (Created session for non-interactive run session_id=…). Friday reads that id and hands it back with --session. The log lines are left out of what a failed turn reports. If no id is read, or the installed Crush refuses --session, it falls back to --continue as before.

The one change outside the adapter: Parser has an optional stderr hook, used by runner.ts.

How you checked it

Added a test in test/crush-adapter.test.ts for reading the id across split chunks, filtering the log lines, and passing --session.

Not run against a live Crush. The log format comes from reading Crush's run.go / app.go and charmbracelet/log.

  • npm run typecheck passes
  • npm test passes: on Windows, 17 tests fail on this branch and main alike; comparing the two runs showed no new failure, only the one added passing test.

🤖 Generated with Claude Code

@splashxmoon

splashxmoon commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Thanks @SeoJunLee-code, this looks good. Reading the session id from --verbose and falling back to --continue when it isn't there is a nice way to keep two Crush threads in one folder apart. It's still marked as a draft: when you're happy with it, mark it ready for review and I'll merge it for the release after 0.4.5.

@SeoJunLee-code
SeoJunLee-code marked this pull request as ready for review November 29, 2026 02:47
`--continue` picks up the newest conversation in the folder, so two Friday
sessions running Crush there could cross over. `crush run --verbose` logs the
conversation's id on stderr; read it and hand it back with `--session`. The log
lines are kept out of what a failed turn reports.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@splashxmoon
splashxmoon merged commit c498451 into splashxmoon:main Nov 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants