fix(jira-issue-to-pr): add default tools to spawned conversation#393
Open
jpelletier1 wants to merge 3 commits into
Open
fix(jira-issue-to-pr): add default tools to spawned conversation#393jpelletier1 wants to merge 3 commits into
jpelletier1 wants to merge 3 commits into
Conversation
The spawned conversation was created without an explicit tools list,
causing the SDK Agent to default to think+finish only — it had no
terminal or file_editor and could not clone repos, create files, or
run git commands.
Changes:
- Use the 'agent' key (not 'agent_settings') to avoid a double-
registration bug in the agent server
- Explicitly set tools: [{name: terminal}, {name: file_editor}]
- Replace encrypted-settings forwarding with LookupSecret references
for user secrets (consistent with github-repo-monitor and
slack-channel-monitor)
- Forward mcp_config as a top-level field when present
Co-authored-by: openhands <openhands@all-hands.dev>
Without X-Expose-Secrets: plaintext, GET /api/settings returns the LLM api_key as '**********', which the spawned conversation cannot use — causing a LiteLLM 'Missing credentials' error. All other scripts (github-repo-monitor, slack-channel-monitor, github-pr-reviewer) already use this header. Co-authored-by: openhands <openhands@all-hands.dev>
Using X-Expose-Secrets: plaintext puts the raw LLM API key in the network payload. The correct approach (per agent-canvas-environment SKILL.md) is X-Expose-Secrets: encrypted, which returns llm.api_key as a Fernet token that the server decrypts when the conversation is created (secrets_encrypted: True). Also switch back to agent_settings (not agent) and restore the full original payload shape (stuck_detection, autotitle, worktree, initial_message.run) — these were lost in the previous commit. The actual root fix remains unchanged: tools are merged into agent_settings so the spawned agent has terminal + file_editor. Co-authored-by: openhands <openhands@all-hands.dev>
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.
Why
The spawned agent conversation failed in two ways:
toolslist, so the SDK Agent defaulted tothink+finishonly and could not execute bash commands, clone repos, or edit files.GET /api/settings(default) returnsllm.api_keyas**********. The spawned conversation received the placeholder and could not authenticate with the LLM.Summary
X-Expose-Secrets: encryptedto fetch settings — returnsllm.api_keyas a Fernet token; the server decrypts it when the conversation is created (secrets_encrypted: True), so the real API key is never in the network payload.terminalandfile_editorintoagent_settings.toolsexplicitly — without them the SDK Agent defaults to think+finish only.LookupSecretreferences so the spawned agent can clone repos and push branches.mcp_configas a top-level field when present.Issue Number
N/A
How to Test
Deploy the
jira-issue-to-prautomation against a Jira Cloud project with a labeled issue. The spawned conversation should start, authenticate with the LLM, and proceed to clone the target repo and open a PR.Notes
The
encrypted+secrets_encrypted: Truepattern is documented inskills/agent-canvas-environment/SKILL.mdas the correct way to forward LLM credentials without exposing them in plaintext.This PR was created by an AI agent (OpenHands) on behalf of the user.