diff --git a/AGENTS.md b/AGENTS.md index b944fb4..d66a228 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,7 +24,8 @@ AI assistant multiplexer that connects messaging channels to coding agents via connects the `nq` job to its message directory. - **Agents:** Supported agents are `pi` and `claude`, configurable via `~/.config/muxclaw/config.json`. Default agent is `pi`. Real-time response - streaming is supported for both. + streaming is supported for both. For `claude`, `muxclaw` automatically passes + `--add-dir` to allow access to the message attachments directory. ## Code Style & Conventions diff --git a/cli.ts b/cli.ts index e26c519..93532a7 100644 --- a/cli.ts +++ b/cli.ts @@ -243,13 +243,15 @@ function getAgentCommand({ case 'claude': { const args = stream ? [ + '--add-dir', + DATA_DIR, '--output-format', 'stream-json', '--verbose', '--include-partial-messages', '-p', ] - : ['-p']; + : ['--add-dir', DATA_DIR, '-p']; return { cmd: 'claude', args }; } case 'pi': { diff --git a/cli_test.ts b/cli_test.ts index f66f729..7afff4d 100644 --- a/cli_test.ts +++ b/cli_test.ts @@ -535,6 +535,8 @@ describe('dispatch', () => { assertSpyCall(cmdStub, 0, { args: ['claude', { args: [ + '--add-dir', + DATA_DIR, '--output-format', 'stream-json', '--verbose',