feat(session): add agent handoff flow#58
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 383ef52e3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| let command = handoff::command_for_target(target, prompt); | ||
| session_action::run(&command, session.directory.as_deref()) |
There was a problem hiding this comment.
Fall back when imported session cwd is absent
For imported handoffs from another machine, the stored session.directory commonly points to a path that does not exist locally; passing it here makes session_action::run call Command::current_dir unconditionally, so recall session handoff --id ... --to ... fails before starting the target agent. Since handoff is the new path that is allowed for imported sessions, please skip the stored cwd when it is missing (or at least for is_import) and fall back to the current directory.
Useful? React with 👍 / 👎.
Signed-off-by: samzong <samzong.lu@gmail.com>
383ef52 to
4c52974
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c52974b7b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "claude-code" => ResumeCommand { program: "claude".to_string(), args: vec![prompt] }, | ||
| "opencode" => ResumeCommand { | ||
| program: "opencode".to_string(), | ||
| args: vec!["run".to_string(), "-i".to_string(), prompt], |
There was a problem hiding this comment.
Drop the unsupported OpenCode -i flag
For the OpenCode target this constructs opencode run -i <prompt>. I checked the OpenCode CLI reference: TUI startup accepts --prompt, while run is documented as opencode run [message..] and its flag table has no -i flag. Selecting OpenCode will therefore fail during argument parsing instead of starting the handoff; build the command with the documented prompt entrypoint instead.
Useful? React with 👍 / 👎.
What's changed?
recall session handofffor launching a new target-agent session from an indexed transcript.Why
Verification
rtk proxy make checkgit diff --check HEAD~1..HEAD