Give each agent thread its own running instance of the app - #168
Merged
Merged
Conversation
One bullet under the general rules: start one instance per thread, keyed by worktree or branch, with its own Hive store inside the app container; hot reload it with SIGUSR1 after each edit; keep it for the thread's life. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
|
| These steer us in the right direction. They are not hard-set, but default to following them; if you think one should be ignored, be very loud about it and get approval from us first. | ||
|
|
||
| - Never edit `*.g.dart` files. Edit the source models, then run `dart run build_runner build --delete-conflicting-outputs`. | ||
| - Each thread owns one running instance of the app, and never touches another's. Start yours once, keyed by your worktree or branch name: `flutter run -d macos --pid-file /tmp/icarus-<key>.pid --dart-entrypoint-args "--hive-store-dir=<dir>"`, with `<dir>` = `~/Library/Containers/xyz.icarus-strats/Data/Library/Application Support/icarus-<key>` so its library is yours alone, launched from an unsandboxed shell or it draws but takes no clicks. Instances share a window frame, so move yours aside before you click. After every edit, hot reload it with `kill -USR1 $(cat /tmp/icarus-<key>.pid)`; the tool's stdin is not a terminal, so typing `r` does nothing. Keep it running for the thread, and kill it when the thread ends. |
Contributor
There was a problem hiding this comment.
Slash-delimited keys break launch
<key> is defined as a worktree or branch name, so a typical value such as feature/isolated-run expands to /tmp/icarus-feature/isolated-run.pid. Flutter does not create /tmp/icarus-feature before writing the PID file, causing the documented launch to exit with PathNotFoundException before the app starts. Normalize the key for a filename or create the PID file's parent directory before invoking Flutter.
Context Used: AGENTS.md (source)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same rule as #167 on the cloud branch, without the shared-session line since main has no accounts: each thread starts one instance of the app, keyed by worktree or branch name, with its own Hive store inside the app container and its own pid file; hot reloads it with SIGUSR1 after each edit; keeps it for the thread's life.
🤖 Generated with Claude Code