Skip to content

Conversation

@theahura
Copy link
Contributor

Summary

🤖 Generated with Nori

  • Fix HTTP 409 "container is not running" error when using --prefer-session flag
  • Replace container.exec() with tar-stream + container.putArchive() for copying session files
  • putArchive works on stopped containers (before container.start()), while exec requires running containers

Test Plan

  • Added integration tests for session file copying in both runCommand and runCommandStreaming
  • All 71 tests pass
  • Lint and type checks pass
  • Manual test with real claude-code and --prefer-session flag

Share Nori with your team: https://www.npmjs.com/package/nori-ai

theahura and others added 2 commits December 12, 2025 14:00
The copySessionFileToContainer method was using container.exec() to copy
session files, but exec requires a running container. Since session files
are copied before container.start(), this caused HTTP 409 errors:
"container is not running"

Replace exec with tar-stream + putArchive which works on stopped containers.
File ownership is set via tar headers (uid/gid 1000) instead of chown.
🤖 Generated with [Nori](https://nori.ai)

Co-Authored-By: Nori <contact@tilework.tech>
@theahura theahura merged commit 4e4c2bc into main Dec 12, 2025
1 check passed
@theahura theahura deleted the fix-session-copy-container-not-running branch December 12, 2025 19:06
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