Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): bound Claude subagent usage #7520

ClosedIvorisnoob(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/7520/headopened View on GitHub

Showing 6 changed files with 107 additions and 5 deletions (loading 4).

x
0 of 6 viewed, 6 left
107 additions and 5 deletionsapps/server/src/provider/Layers/ClaudeAdapter.test.tsModified
View file
@@ -160,6 +160,7 @@
readonly cwd?: string;
readonly baseDir?: string;
readonly claudeConfig?: Partial<ClaudeSettings>;
+ readonly environment?: NodeJS.ProcessEnv;
readonly instanceId?: ProviderInstanceId;
}) {
const query = new FakeClaudeQuery();
@@ -172,6 +173,7 @@
​
const adapterOptions: ClaudeAdapterLiveOptions = {
...(config?.instanceId ? { instanceId: config.instanceId } : {}),
+ ...(config?.environment ? { environment: config.environment } : {}),
createQuery: (input) => {
createInput = input;
return query;
@@ -467,6 +469,50 @@
});
​
+ it.effect("bounds native Claude subagent fan-out by default", () => {
+ const harness = makeHarness({ environment: { PATH: "/bin" } });
+ return Effect.gen(function* () {
+ const adapter = yield* ClaudeAdapter;
+ yield* adapter.startSession({
+ threadId: THREAD_ID,
+ provider: ProviderDriverKind.make("claudeAgent"),
+ runtimeMode: "full-access",