shannon icon indicating copy to clipboard operation
shannon copied to clipboard

[BUG]: Intermediate deliverables placed in incorrect location

Open akirilov opened this issue 8 months ago • 2 comments

Describe the bug

The lack of a (more) complete deliverable file path in apps/worker/prompts/pre-recon-code.txt appears to be confusing the agent about where to place the deliverable. The pre-recon agent creates a new deliverables folder inside the code repository (rather than inside the workspace), probably as a result to changing its path to the repo and then just using the relative file path from that location.

The pre-recon file should include instructions to the agent to make sure they are placing their deliverables in the workspace. This should also probably be repeated for downstream agents and their own deliverables as well (the recon agent is also putting deliverables int he wrong place, presumably chaining off the pre-recon agent)

Steps to reproduce

There's no real good way to reproduce this because it relies on an LLM to do make a mistake which it presumably doesn't reliably do (or else this would have been fixed). I guess you can try to run it repeatedly until it makes this same mistake in the same way.

Expected behaviour

Deliverables are located in the workspace.

Actual behaviour

Deliverables are placed in the code repo (presumably the current working directory of the agent)

Pre-submission checklist (required)

  • [x] I have searched the existing open issues and confirmed this bug has not already been reported.
  • [x] I am running the latest released version of shannon.

If applicable

  • [x] I have included relevant error messages, stack traces, or failure details.
  • [ ] I have checked the audit logs and pasted the relevant errors.
  • [ ] I have inspected the failed Temporal workflow run and included the failure reason.
  • [ ] I have included clear steps to reproduce the issue.
  • [ ] I have redacted any sensitive information (tokens, URLs, repo names).

Debugging details

Example of the incorrect placement in the repo:

$ ls ../juice-shop/deliverables
code_analysis_deliverable.md recon_deliverable.md

The actual deliverables folder is empty:

$ ls workspaces/host-docker-internal_shannon-1774933168062/deliverables

Snippet from the agent log showing that it's using the wrong file path:

{"type":"llm_response","timestamp":"2026-03-31T05:13:16.685Z","data":{"turn":422,"content":"{\"type\":\"tool_use\",\"id\":\"toolu_bdrk_01Qh7z66HU5dKHD8dUs5SfFp\",\"name\":\"Read\",\"input\":{\"file_path\":\"/repos/juice-shop/deliverables/code_analysis_deliverable.md\",\"offset\":88,\"limit\":5}}","timestamp":"2026-03-31T05:13:16.685Z"}}
{"type":"llm_response","timestamp":"2026-03-31T05:13:20.103Z","data":{"turn":423,"content":"{\"type\":\"tool_use\",\"id\":\"toolu_bdrk_01Eu4ANUp5hD6WbBf7qhnSyu\",\"name\":\"Read\",\"input\":{\"file_path\":\"/repos/juice-shop/deliverables/code_analysis_deliverable.md\",\"offset\":74,\"limit\":5}}","timestamp":"2026-03-31T05:13:20.103Z"}}
{"type":"llm_response","timestamp":"2026-03-31T05:15:00.122Z","data":{"turn":424,"content":"{\"type\":\"tool_use\",\"id\":\"toolu_bdrk_01GmCurxsGY25FZv2xD9o2Bf\",\"name\":\"Edit\",\"input\":{\"replace_all\":false,\"file_path\":\"/repos/juice-shop/deliverables/code_analysis_deliverable.md\",\"old_string\":\"| **Error Handling** | errorhandler() middleware | Returns full stack traces to clients; `server.ts:676` |\\n\\n\",\"new_string\":\"| **Error Handling** | errorhandler() middleware | Returns full stack traces to clients; `server.ts:676` |\\n\\n---\\n\\n## 3. Authentication & Authorization Deep Div...

Screenshots

No response

Authentication method used

CLAUDE_CODE_OAUTH_TOKEN

Full ./shannon command with all flags used (with redactions)

./shannon start -u http://host.docker.internal:8000 -r ../juice-shop

Are you using any experimental models or providers other than default Anthropic models?

Yes

If Yes, which one (model/provider)?

Default models but from a custom bedrock provider

OS (with version)

macOS 26.3.1

Docker version ('docker -v')

Docker version 29.2.1, build a5c7197

Additional context

Because the Claude SDK does not provide support for custom Bedrock providers (only AWS) and my use case requires a custom (likely proxied) AWS provider URL, I had to create and adapter to adapt the Bedrock API to the Claude API format and use the custom Claude API provider instead. This is almost certainly not causing the issue as the problem is caused entirely by LLMs being LLMs but I figured it's worth mentioning.

akirilov avatar Mar 31 '26 05:03 akirilov

Ah ok I see, there's a step at the end that copies from the repo to the audit path. I'm not quite convinced that putting intermediate "deliverables" in the repo is a choice I agree with but I don't think this is a bug at least so I'll close this.

akirilov avatar Mar 31 '26 06:03 akirilov

Thanks again for the detailed report — this is a really helpful catch.

Le mar. 31 mar. 2026, 00:53, akirilov @.***> a écrit :

akirilov created an issue (KeygraphHQ/shannon#262) https://github.com/KeygraphHQ/shannon/issues/262 Describe the bug

The lack of a (more) complete deliverable file path in apps/worker/prompts/pre-recon-code.txt appears to be confusing the agent about where to place the deliverable. The pre-recon agent creates a new deliverables folder inside the code repository (rather than inside the workspace), probably as a result to changing its path to the repo and then just using the relative file path from that location.

The pre-recon file should include instructions to the agent to make sure they are placing their deliverables in the workspace. This should also probably be repeated for downstream agents and their own deliverables as well (the recon agent is also putting deliverables int he wrong place, presumably chaining off the pre-recon agent) Steps to reproduce

There's no real good way to reproduce this because it relies on an LLM to do make a mistake which it presumably doesn't reliably do (or else this would have been fixed). I guess you can try to run it repeatedly until it makes this same mistake in the same way. Expected behaviour

Deliverables are located in the workspace. Actual behaviour

Deliverables are placed in the code repo (presumably the current working directory of the agent) Pre-submission checklist (required)

  • I have searched the existing open issues and confirmed this bug has not already been reported.
  • I am running the latest released version of shannon.

If applicable

  • I have included relevant error messages, stack traces, or failure details.
  • I have checked the audit logs and pasted the relevant errors.
  • I have inspected the failed Temporal workflow run and included the failure reason.
  • I have included clear steps to reproduce the issue.
  • I have redacted any sensitive information (tokens, URLs, repo names).

Debugging details

Example of the incorrect placement in the repo:

$ ls ../juice-shop/deliverables code_analysis_deliverable.md recon_deliverable.md

The actual deliverables folder is empty:

$ ls workspaces/host-docker-internal_shannon-1774933168062/deliverables

Snippet from the agent log showing that it's using the wrong file path:

{"type":"llm_response","timestamp":"2026-03-31T05:13:16.685Z","data":{"turn":422,"content":"{"type":"tool_use","id":"toolu_bdrk_01Qh7z66HU5dKHD8dUs5SfFp","name":"Read","input":{"file_path":"/repos/juice-shop/deliverables/code_analysis_deliverable.md","offset":88,"limit":5}}","timestamp":"2026-03-31T05:13:16.685Z"}} {"type":"llm_response","timestamp":"2026-03-31T05:13:20.103Z","data":{"turn":423,"content":"{"type":"tool_use","id":"toolu_bdrk_01Eu4ANUp5hD6WbBf7qhnSyu","name":"Read","input":{"file_path":"/repos/juice-shop/deliverables/code_analysis_deliverable.md","offset":74,"limit":5}}","timestamp":"2026-03-31T05:13:20.103Z"}} {"type":"llm_response","timestamp":"2026-03-31T05:15:00.122Z","data":{"turn":424,"content":"{"type":"tool_use","id":"toolu_bdrk_01GmCurxsGY25FZv2xD9o2Bf","name":"Edit","input":{"replace_all":false,"file_path":"/repos/juice-shop/deliverables/code_analysis_deliverable.md","old_string":"| Error Handling | errorhandler() middleware | Returns full stack traces to clients; server.ts:676 |\n\n","new_string":"| Error Handling | errorhandler() middleware | Returns full stack traces to clients; server.ts:676 |\n\n---\n\n## 3. Authentication & Authorization Deep Div...

Screenshots

No response Authentication method used

CLAUDE_CODE_OAUTH_TOKEN Full ./shannon command with all flags used (with redactions)

./shannon start -u http://host.docker.internal:8000 -r ../juice-shop Are you using any experimental models or providers other than default Anthropic models?

Yes If Yes, which one (model/provider)?

Default models but from a custom bedrock provider OS (with version)

macOS 26.3.1 Docker version ('docker -v')

Docker version 29.2.1, build a5c7197 Additional context

Because the Claude SDK does not provide support for custom Bedrock providers (only AWS) and my use case requires a custom (likely proxied) AWS provider URL, I had to create and adapter to adapt the Bedrock API to the Claude API format and use the custom Claude API provider instead. This is almost certainly not causing the issue as the problem is caused entirely by LLMs being LLMs but I figured it's worth mentioning.

— Reply to this email directly, view it on GitHub https://github.com/KeygraphHQ/shannon/issues/262?email_source=notifications&email_token=CAYBNVLRBPK6EIQJ2QPK45T4TNMNZA5CNFSL4Z3JMQ5C6L3HNF2C22DVMIXUS43TOVSS6NBRG43DANRYGU4TBJTSMVQXG33OVJZXKYTTMNZGSYTFMSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L, or unsubscribe https://github.com/notifications/unsubscribe-auth/CAYBNVL7VETXU6GGYPZ6RCD4TNMNZAVCNFSM6AAAAACXHF5GISVHI2DSMVQWIX3LMV43ASLTON2WKOZUGE3TMMBWHA2TSMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ariapalmer1231-png avatar Mar 31 '26 10:03 ariapalmer1231-png